gui: Sessions' Settings › no longer scrolls the whole window (kalicyh on X)
Settings' explanation lines are held out of sight with position:absolute (hover mice), but their row had no positioned ancestor, so each sat at the window's top-left corner, below the fold for the rows far down a page. The document (body is overflow:hidden, still scrollable by script) then had ~870px of scroll, and Sessions' Settings › (openSettingsAt -> scrollIntoView on the Privacy session-history rows) scrolled the window as well as the page: Settings' top, the header, was pushed off the screen. The row's .who is now the line's box (position:relative), in Settings and in the provider editor's prefs (same rule, same hole). Every other openSettingsAt link (Privacy rows, General's name row) shared it. Run (win-run xiaomi-gpu; mote refused SSH all session, WSL tar errors): - sessions-to-settings, all 5 languages x 1100/420 x chromium+webkit: 20 of 20 ok. The new check (window scrollTop 0, Settings top >= 0, document no taller than the window) is red on the old CSS, 4 of 4 in zh (both engines, both widths). - settings-hints/-lines-wrap/-places/-back/-search/-tabs-stick, editor-hints/-roomy, provider-prefs: 15 failures on this change against 18 on the old CSS, the same names minus three the fix cleared (webkit de 440 line-wrap, webkit hover hints); the remaining 15 (chromium de 440 line-wrap, Settings' search, both engines) fail the same on the old CSS on the Windows box. Not run: the full GUI suite, go test, macOS/Linux WebKitGTK.
This commit is contained in:
@@ -4045,6 +4045,11 @@ input.words.compact-num { flex: none; width: 76px; font-variant-numeric: tabular
|
||||
:is(#view-settings:not(.set-searching), .editor.roomy .prov-prefs) .row.pref > .who > .sub:not(.err, .bad, .say, .proxy-check, .lib-way, .image-gen-hidden, .sync-sign-in, .no-names, .pv-hits, .feat-why, .vision-not-marked, .video-gen-how, .font-note, .acts, [role="status"], #proxySub):not(#otelSessionsRow *, #allowList *, .disabled-model *) {
|
||||
--hint: 1; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
|
||||
}
|
||||
/* the line held out of sight stays in its row's box: placed against the
|
||||
page it sat at the window's top-left, and a row opened far down
|
||||
(Sessions' Settings ›, scrolled to in Privacy) scrolled the whole page
|
||||
to reach it, the header off the top (kalicyh on X) */
|
||||
:is(#view-settings, .editor.roomy .prov-prefs) .row.pref:not(.lan-address-row) > .who { position: relative; }
|
||||
/* a row left with its name alone is as tall as any other: its control
|
||||
(a switch, a field, a shortcut) no longer sets it apart */
|
||||
#view-settings .row.pref:not(.feat-set) { box-sizing: content-box; min-height: 27px; } /* 51 with its padding, a line above it outside */
|
||||
|
||||
@@ -75,6 +75,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
}
|
||||
await go.click();
|
||||
await page.locator("#view-settings #sessionReadsList .row.flash").first().waitFor();
|
||||
// the page stays where it is: Settings' held-out lines sat against the
|
||||
// window, so reaching the row scrolled the whole page and cut its top
|
||||
// off (kalicyh on X)
|
||||
await page.waitForTimeout(600);
|
||||
const place = await page.evaluate(() => ({ doc: document.scrollingElement.scrollTop, top: document.querySelector("#view-settings").getBoundingClientRect().top, tall: document.documentElement.scrollHeight - innerHeight }));
|
||||
assert.equal(place.doc, 0, "the window itself is not scrolled");
|
||||
assert(place.top >= 0, "Settings starts inside the window");
|
||||
assert(place.tall <= 1, "nothing of Settings runs past the window");
|
||||
const back = page.locator("#navBack");
|
||||
await back.waitFor();
|
||||
await back.click();
|
||||
|
||||
Reference in New Issue
Block a user