From 6a81a3c62a264531c94d9999328dc01a5be7191f Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 11 Nov 2026 02:14:16 +0800 Subject: [PATCH] masking: its head's Settings link is a link, and the head wraps before it squeezes the title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.1.3386 (ff7d84b9b) put "Settings › Privacy" in Insights › Masking's head as a second button.text beside Turn off masking. The whole GUI suite, run on mote after the tag, went red on it: - mask-alert and masking-records "masking on, the page turns it off and on again" found two button.text where Turn off is the only one (all languages, both engines); - masking-records "the card says what was kept" at de 640px: the two buttons and the 7/30 days switch left the title a column ~60px wide, the head 276px tall, and the first request at 907px, past 760. Now the link is a .link (as on Plugins › Built-in), and .msk-head wraps whenever its title would be narrower than 16em, in place of the 600px media query. de 640px: head 107px, first request 738px. Run on mote: node --test masking-records, mask-alert, builtin-places (Chromium and WebKit, every language): 218 pass, 0 fail. Red before this on the same files (gui-full.log of the post-tag run). The rest of that post-tag GUI run is triaged separately; mote rebooted mid-run twice, and its other reds are in files this change doesn't reach. --- internal/gui/assets/plugins/redact/page.js | 2 +- internal/gui/assets/plugins/redact/redact.css | 7 +++---- internal/gui/tests/builtin-places.test.cjs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/gui/assets/plugins/redact/page.js b/internal/gui/assets/plugins/redact/page.js index 7e0ff15e3..eed93227f 100644 --- a/internal/gui/assets/plugins/redact/page.js +++ b/internal/gui/assets/plugins/redact/page.js @@ -136,7 +136,7 @@ function drawMaskCard() { } else { // back to its settings (netube99 on X), unless Turn off goes there if (!maskSettings().redactWords?.length) { - const set = el("button", "text", t("Settings") + " › " + $("#setTab-privacy").textContent); + const set = el("button", "link", t("Settings") + " › " + $("#setTab-privacy").textContent); set.type = "button"; set.onclick = (e) => openSettingsAt(e, "privacy", "#redactList .row"); head.append(set); diff --git a/internal/gui/assets/plugins/redact/redact.css b/internal/gui/assets/plugins/redact/redact.css index d4309ea6a..bd6b7b4a1 100644 --- a/internal/gui/assets/plugins/redact/redact.css +++ b/internal/gui/assets/plugins/redact/redact.css @@ -6,10 +6,9 @@ #view-masking .grow { flex: 1; } .msk-card { position: relative; padding: 16px 20px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); } .msk-card[hidden], .msk-list[hidden], .msk-one[hidden] { display: none; } -.msk-head { display: flex; align-items: flex-start; gap: 8px 12px; } -.msk-title { min-width: 0; } -/* narrow, its buttons go under the words rather than off the side */ -@media (max-width: 600px) { .msk-head { flex-wrap: wrap; } .msk-title { flex-basis: 100%; } } +.msk-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; } +/* its buttons go under the words before they squeeze them */ +.msk-title { flex: 1 1 16em; min-width: 0; } .msk-title h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--fg); } .msk-sub { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--muted); } .msk-band { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 36px; align-items: center; margin-top: 12px; } diff --git a/internal/gui/tests/builtin-places.test.cjs b/internal/gui/tests/builtin-places.test.cjs index bffb9abd1..1c12e776c 100644 --- a/internal/gui/tests/builtin-places.test.cjs +++ b/internal/gui/tests/builtin-places.test.cjs @@ -196,7 +196,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", await t.test(`${lang} at ${width}px: Masking's head goes back to Settings › Privacy`, async () => { const { page } = await open(lang, width, "?view=masking"); const head = page.locator("#maskCard .msk-head"); - const set = head.locator("button.text", { hasText: w("Settings") + " › " + w("Privacy") }); + const set = head.locator("button.link", { hasText: w("Settings") + " › " + w("Privacy") }); await set.waitFor(); assert.equal(await wide(page), 0); assert.deepEqual(await past(head), []);