usage: the speed card's Check… shows without hover (skingstyle48487 on X)

skingstyle48487 couldn't find Check… on the Model speed › Providers rows:
with a mouse it showed only while the row was pointed at. It now always
shows, in the muted colour, and takes the control colour when its row is
pointed at or it has focus. No new label.

Run (mote): usage-model-speed.test.cjs, chromium and webkit, five
languages: 12/12.
Broken by hand: the test with the old app.css is red in both engines
("Check… shows without hover").
This commit is contained in:
yetone
2026-11-18 05:27:43 +08:00
parent 59546ae1b7
commit 495ada49a7
2 changed files with 9 additions and 4 deletions
+4 -4
View File
@@ -1628,10 +1628,10 @@ body.masked :hover > .acct-eye, body.masked .pq-card:hover .acct-eye, body.maske
.led-spd.by-prov td.nm { min-width: 112px; }
.led-spd th.act, .led-spd td.act { width: 1px; padding-left: 8px; }
.led-spd td.off { color: var(--amber); }
.led-spd-check { height: 20px; padding: 0 2px; font-size: 11px; transition: opacity 150ms ease; }
@media (hover: hover) and (pointer: fine) {
.led-spd tr:not(:hover) .led-spd-check:not(:focus-visible) { opacity: 0; }
}
/* always there, quiet until its row is pointed at (skingstyle48487: a
button shown only on hover went unfound) */
.led-spd-check { height: 20px; padding: 0 2px; font-size: 11px; color: var(--muted); }
.led-spd tr:hover .led-spd-check, .led-spd-check:focus-visible { color: var(--ctl-fg); }
.led-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; }
.led-bar .grow { flex: 1; }
.led-by { font-size: 11.5px; color: var(--muted); }
@@ -206,6 +206,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
checks = 0;
const go = card.locator("tbody tr").nth(1).locator(".led-spd-check");
assert.equal((await go.textContent()).trim(), w.check);
// found without pointing at its row first
await p.mouse.move(0, 0);
await p.waitForTimeout(200);
assert.equal(await go.evaluate((b) => getComputedStyle(b).opacity), "1", "Check… shows without hover");
assert(await go.isVisible());
await go.click();
const dlg = p.locator("#modal .relay-check");
await dlg.waitFor();