gui: the open-source licenses text takes the dialog's whole width (JiuLiaowkvn on X)

The notices <pre> sat in the editor grid's first column (fit-content 132px,
or 35% at 420px) once framed, so only a narrow strip of the dialog showed
text. It now spans both columns.

Run (mote, chromium + webkit): about-notices.test.cjs, 20 pass. The new
width assertion fails on the old CSS (15% of the dialog at 1100, 35% at
420), passes after. Not run: the rest of the GUI suite, full go suite.
This commit is contained in:
yetone
2026-11-11 00:40:17 +08:00
parent db0f2f20d4
commit 5b28e85999
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -5152,6 +5152,6 @@ body .row.agent .ag-prefs .row.pref .who { display: block; }
.sess-pick.led-more svg { transform: none; }
.sess-tools .led-rename { flex: none; width: 180px; height: 26px; padding: 0 8px; border-radius: 7px; font-size: 12px; }
/* Settings › About › Open-source licenses: the notices, as written */
.notices-text { margin: 0; font: 11px/1.5 var(--code); white-space: pre-wrap; overflow-wrap: anywhere; }
.notices-text { grid-column: 1 / -1; min-width: 0; margin: 0; font: 11px/1.5 var(--code); white-space: pre-wrap; overflow-wrap: anywhere; }
.client-cert { display: grid; gap: 6px; min-width: 0; }
.client-cert input { width: 100%; min-width: 0; }
@@ -42,6 +42,12 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
return { inside: d.right <= innerWidth && d.bottom <= innerHeight, scrolls: body.scrollHeight > body.clientHeight, wide: document.documentElement.scrollWidth <= innerWidth };
});
assert.deepEqual(fits, { inside: true, scrolls: true, wide: true });
// the text takes the dialog's whole width, not the editor grid's narrow first column
const span = await page.evaluate(() => {
const p = document.querySelector("#modal .notices-text").getBoundingClientRect(), b = document.querySelector("#modal .ebody").getBoundingClientRect();
return p.width / b.width;
});
assert.ok(span > 0.85, `the notices take ${Math.round(span * 100)}% of the dialog's width`);
await page.locator("#modal .bar button.primary").click();
await page.locator("#modal").waitFor({ state: "hidden" });
assert.deepEqual(errors, []);