diff --git a/packages/tracker/README.md b/packages/tracker/README.md index 5b2e1a25767..905252d25fb 100644 --- a/packages/tracker/README.md +++ b/packages/tracker/README.md @@ -92,17 +92,29 @@ where its top edge sat in the viewport. ## Look and shell The browser client uses `@shepherdjerred/console-ui`, the shared look of Hub, -Delivery, Go link and Flags: its `ShellFrame` and `Sidebar` (app switcher, -search, Workspace, Views, Teams and Projects groups, identity, settings, -shortcuts and the theme row), its `--ui-*` colour tokens, Inter and Berkeley -Mono, and its 28px controls. `src/client/styles/tokens.css` adds only -non-colour tokens (shadows, backdrop, the accent selection tint and motion). -`src/client/styles/base.css` puts element defaults in a console-ui's -`ui.app` cascade layer, below its components; Tracker's own class -rules are unlayered and win over both. The theme preference uses console-ui's -theme store under `tracker.theme`, applied before first paint by -`index.html`. At 900px and below console-ui hides the sidebar; Tracker's page -header and phone bottom navigation take over. +Delivery and the other consoles. Its `ConsoleShell` draws the frame: app +switcher, the search button that opens Tracker's palette, the Workspace, +Views, Teams and Projects groups, and a footer with identity, settings, +shortcuts and the theme row. At 900px and below the same navigation moves +into the shell's phone top bar and drawer, and New issue moves into the top +bar. Every page starts with a `HeaderBar` (title, live indicator, New issue); +the issue and forum thread pages draw their own `

`, so their header +title is plain text. Banners, empty and error states and the shell's +buttons are console-ui's `Banner`, `State` and `Button`. + +`src/client/styles/base.css` puts Tracker's bare element defaults (`button`, +fields, headings, `kbd`, `pre`) in console-ui's reserved `ui.app` cascade +layer, which console-ui orders between its tokens and its components, so +console-ui's pieces keep their look over them. Tracker declares no layer +order and no layer names of its own: a top-level app layer would come after +all of `ui` and outrank the components. Every Tracker class rule is +unlayered and wins over both; it styles only Tracker's own classes, which +the per-app conformance scan and its shrinking allowlist enforce. +`src/client/styles/tokens.css` adds only non-colour tokens (shadows, +backdrop, the accent selection tint and motion). The theme preference uses +console-ui's theme store on the shared `ops-theme` key, applied before first +paint by `index.html`. A preference saved under the old `tracker.theme` key is +moved onto `ops-theme` once on load (`src/client/ui/theme.ts`). ## Browser controls diff --git a/packages/tracker/e2e/accessibility.spec.ts b/packages/tracker/e2e/accessibility.spec.ts index 24b3285178e..7c79568fb15 100644 --- a/packages/tracker/e2e/accessibility.spec.ts +++ b/packages/tracker/e2e/accessibility.spec.ts @@ -209,9 +209,12 @@ const surfaces: { name: string; open: (page: Page) => Promise }[] = [ name: "the browser identity dialog", open: async (page) => { await page.goto("/issues"); - const more = page.getByRole("button", { name: "More", exact: true }); - if (await more.isVisible()) { - await more.click(); + const menu = page.getByRole("button", { + name: "Open navigation", + exact: true, + }); + if (await menu.isVisible()) { + await menu.click(); } await page.getByRole("button", { name: /^Acting as /u }).click(); await expect( diff --git a/packages/tracker/e2e/data.spec.ts b/packages/tracker/e2e/data.spec.ts index f9ea89c4e60..4e84b1699ee 100644 --- a/packages/tracker/e2e/data.spec.ts +++ b/packages/tracker/e2e/data.spec.ts @@ -196,6 +196,10 @@ test("unsent text survives navigation and a reload, and is cleared once sent", a await page.goto(`/issues/${identifier}`); const box = page.getByPlaceholder("Leave a comment…"); await box.fill(draft); + // A phone keeps the navigation in the top bar's drawer. + if (info.project.name === "mobile") { + await page.getByRole("button", { name: "Open navigation" }).click(); + } await page .getByRole("navigation") .getByRole("link", { name: "Issues", exact: true }) diff --git a/packages/tracker/e2e/platform.spec.ts b/packages/tracker/e2e/platform.spec.ts index 544927d3a55..3733f79b719 100644 --- a/packages/tracker/e2e/platform.spec.ts +++ b/packages/tracker/e2e/platform.spec.ts @@ -140,7 +140,9 @@ test("settings is reachable through the navigation on every layout", async ({ }, info) => { await page.goto("/issues"); if (info.project.name === "mobile") { - await page.getByRole("button", { name: "More", exact: true }).click(); + await page + .getByRole("button", { name: "Open navigation", exact: true }) + .click(); await expect( page.getByRole("dialog").getByRole("link", { name: "Actors" }), ).toBeVisible(); @@ -163,7 +165,7 @@ test("an explicit theme is applied before the app loads and tints the browser ch }) => { await page.emulateMedia({ colorScheme: "light" }); await page.addInitScript(() => { - globalThis.localStorage.setItem("tracker.theme", "dark"); + globalThis.localStorage.setItem("ops-theme", "dark"); }); await page.route("**/assets/*.js", (route) => route.abort()); await page.goto("/issues"); diff --git a/packages/tracker/e2e/tracker.spec.ts b/packages/tracker/e2e/tracker.spec.ts index 9ba77b4631f..0ec9ea931fb 100644 --- a/packages/tracker/e2e/tracker.spec.ts +++ b/packages/tracker/e2e/tracker.spec.ts @@ -25,10 +25,10 @@ async function prepareBoard(page: Page, title: string) { name: `Move ${identifier ?? ""}`, exact: true, }); - // The mobile bottom nav is fixed over the viewport's lower edge. The - // minimum scroll that marks the handle "in view" leaves that handle - // underneath the nav, so a touch there hits the nav and the card never - // starts dragging. Center it in the scrollport, above the nav. + // The phone top bar sticks over the viewport's upper edge. The minimum + // scroll that marks the handle "in view" can leave that handle underneath + // the bar, so a touch there hits the bar and the card never starts + // dragging. Center it in the scrollport, clear of the bar. await handle.evaluate((element) => { element.scrollIntoView({ block: "center", inline: "center" }); }); diff --git a/packages/tracker/e2e/views.spec.ts b/packages/tracker/e2e/views.spec.ts index 4f54f2c9b27..24fe3f19bc1 100644 --- a/packages/tracker/e2e/views.spec.ts +++ b/packages/tracker/e2e/views.spec.ts @@ -11,14 +11,14 @@ import { test.afterEach(({ request }) => removeScratchIssues(request)); -/** Where the saved views are listed: the sidebar, or the phone's More sheet. */ +/** Where the saved views are listed: the sidebar, or the phone's drawer. */ async function viewsList(page: Page, mobile: boolean) { if (mobile) { await page - .getByRole("navigation", { name: "Mobile navigation" }) - .getByRole("button", { name: "More" }) + .getByRole("banner") + .getByRole("button", { name: "Open navigation" }) .click(); - return page.getByRole("dialog", { name: "More" }); + return page.getByRole("dialog", { name: "Navigation" }); } return page.getByRole("complementary", { name: "Tracker" }); } diff --git a/packages/tracker/index.html b/packages/tracker/index.html index 8a961f5401a..0cc24f5729c 100644 --- a/packages/tracker/index.html +++ b/packages/tracker/index.html @@ -24,11 +24,15 @@ />