chore: various trivial fixes (#38070)

Follow-up to #37987, addressing the unresolved review comments on the
org members search form.

And fix more trivial problems together (see the commit titles)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
bircni
2026-06-11 19:33:21 +02:00
committed by GitHub
parent fefb6f3219
commit 5a24438698
19 changed files with 59 additions and 62 deletions
+1
View File
@@ -278,6 +278,7 @@ a {
a:hover {
text-decoration-line: underline;
text-underline-position: under; /* necessary for CJK fonts, otherwise, default "auto" makes the underline cross-over the CJK text bottom */
}
/* a = always colored, underlined on hover */
+1 -10
View File
@@ -39,25 +39,16 @@ a.ui.label {
height: 2.1666em;
}
.ui.label > .color-icon {
margin-left: 0;
}
.ui.label > .icon {
width: auto;
margin: 0 0.75em 0 0;
}
.ui.label > .detail {
display: inline-block;
vertical-align: top;
font-weight: var(--font-weight-medium);
margin-left: 1em;
margin-left: 0.5em; /* our .ui.label already provides flex gap, so the margin here shouldn't be too large */
opacity: 0.8;
}
.ui.label > .detail .icon {
margin: 0 0.25em 0 0;
}
.ui.label > .close.icon,
.ui.label > .delete.icon {
+4
View File
@@ -22,6 +22,10 @@
overflow-wrap: anywhere;
}
.toast-body pre {
white-space: pre-wrap; /* online editor, when git hook fails, the rendered message uses "pre" */
}
.toast-close {
border-radius: var(--border-radius);
width: 30px;
+9 -20
View File
@@ -1,23 +1,12 @@
import {registerGlobalInitFunc} from '../modules/observer.ts';
import {addDelegatedEventListener, queryElems} from '../utils/dom.ts';
export function initRepositorySearch() {
const repositorySearchForm = document.querySelector<HTMLFormElement>('#repo-search-form');
if (!repositorySearchForm) return;
repositorySearchForm.addEventListener('change', (e: Event) => {
e.preventDefault();
const params = new URLSearchParams();
for (const [key, value] of new FormData(repositorySearchForm).entries()) {
params.set(key, value as string);
}
if ((e.target as HTMLInputElement).name === 'clear-filter') {
params.delete('archived');
params.delete('fork');
params.delete('mirror');
params.delete('template');
params.delete('private');
}
params.delete('clear-filter');
window.location.search = params.toString();
registerGlobalInitFunc('initRepositorySearch', (form: HTMLFormElement) => {
addDelegatedEventListener(form, 'change', 'input[type="radio"]', () => form.submit());
form.querySelector('.repo-search-filter-reset')!.addEventListener('click', () => {
queryElems(form, 'input[type="radio"]', (el: HTMLInputElement) => el.checked = false);
form.submit();
});
});
}
+3
View File
@@ -19,6 +19,9 @@ function initDevtestPage() {
levelMap[level](message);
});
}
document.querySelector('.toast-test-button-pre')!.addEventListener('click', () => {
showErrorToast(html`<div>message <pre>pre ${'a'.repeat(200)}</pre><details><summary>summary</summary>details</details></div>`, {useHtmlBody: true});
});
}
const modalButtons = document.querySelector('.modal-buttons');