From 0e04e16590eea11acafbdccb59e30d2280e5924c Mon Sep 17 00:00:00 2001 From: Shu Chen <338845574+shu-chen-dot-ca@users.noreply.github.com> Date: Tue, 24 Nov 2026 19:43:15 -0500 Subject: [PATCH] fix(gui): let the Combos page scroll past suggested combos (#9101) --- gui/src/styles-combos-workspace.css | 14 +++++++----- gui/tests/combos-workspace-scroll.test.ts | 28 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 gui/tests/combos-workspace-scroll.test.ts diff --git a/gui/src/styles-combos-workspace.css b/gui/src/styles-combos-workspace.css index 9a254981eba..5f06ce761e3 100644 --- a/gui/src/styles-combos-workspace.css +++ b/gui/src/styles-combos-workspace.css @@ -30,19 +30,21 @@ } /* Revalidation shell: keeps the workspace body stable while aria-busy and an - sr-only status span announce in-flight refreshes to assistive tech. */ + sr-only status span announce in-flight refreshes to assistive tech. + Suggested combos and their notices render above the workspace grid, which keeps + the body's full height. The body scrolls, so whatever sits above the grid scrolls + out of the way and the grid's lower part (the Save / Remove bar) stays reachable. */ .combos-workspace-shell-body { flex: 1 1 auto; min-height: 0; - overflow: hidden; + overflow-x: hidden; + overflow-y: auto; display: flex; flex-direction: column; } -.rb-suggest + .combos-workspace-root { - flex: 1 1 0; - min-height: 0; - height: auto; +.combos-workspace-shell-body > .combos-workspace-root { + flex: 0 0 auto; } .combos-workspace-rail { diff --git a/gui/tests/combos-workspace-scroll.test.ts b/gui/tests/combos-workspace-scroll.test.ts new file mode 100644 index 00000000000..549275616d2 --- /dev/null +++ b/gui/tests/combos-workspace-scroll.test.ts @@ -0,0 +1,28 @@ +/** + * Combos page: content above the workspace grid must not push the grid's bottom out of reach. + * + * Suggested combos (and their notices) render inside `.combos-workspace-shell-body`, above + * `.combos-workspace-root`. The grid keeps the body's full height, so with anything above it + * the grid ends below the viewport. The body used to clip (`overflow: hidden`), leaving the + * lower detail fields and the Save / Remove bar unreachable (#9101). A sibling rule meant to + * shrink the grid never matched, because the suggestions are wrapped in a fieldset, and would + * have squeezed the grid to nothing once "Show all" expanded the list. + * + * Source-text assertions; the rendered geometry was measured in Chromium while fixing this. + */ +import { expect, test } from "bun:test"; +import { effectiveDeclaration, withoutComments } from "./helpers/css-declarations"; + +const css = withoutComments( + await Bun.file(new URL("../src/styles-combos-workspace.css", import.meta.url)).text(), +); + +test("the shell body scrolls, so content above the workspace can scroll out of the way", () => { + expect(effectiveDeclaration(css, ".combos-workspace-shell-body", "overflow-y")).toBe("auto"); + expect(() => effectiveDeclaration(css, ".combos-workspace-shell-body", "overflow")).toThrow("property not found"); +}); + +test("the workspace grid keeps its full height instead of shrinking under the suggestions", () => { + expect(effectiveDeclaration(css, ".combos-workspace-shell-body > .combos-workspace-root", "flex")).toBe("0 0 auto"); + expect(css).not.toMatch(/\.rb-suggest\s*\+\s*\.combos-workspace-root/); +});