masking: its head's Settings link is a link, and the head wraps before it squeezes the title

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.
This commit is contained in:
yetone
2026-11-11 02:14:20 +08:00
parent 418bb6c9e1
commit 6a81a3c62a
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -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);
@@ -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; }
+1 -1
View File
@@ -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), []);