From 9cf6c05325bdc47a54eaf55c71bf1dd35e22739e Mon Sep 17 00:00:00 2001 From: lilleman Date: Wed, 5 Aug 2026 02:23:50 +0200 Subject: [PATCH] Name the chrome's language menu and guard anchor positioning in the fallback --- README.md | 2 +- e2e-tests/visual.spec.ts | 2 +- public/css/styles.css | 12 ++++++++---- src/ui/data-table.test.ts | 4 +++- src/ui/menu.test.ts | 4 ++-- src/ui/shell.test.ts | 7 ++++--- views/partials/data-table.ejs | 1 + views/partials/locale-switch.ejs | 6 ++++-- views/partials/menu.ejs | 4 ++-- views/partials/shell.ejs | 6 +++--- 10 files changed, 29 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index df0bbd0..8025876 100644 --- a/README.md +++ b/README.md @@ -916,7 +916,7 @@ The core and all building blocks **work with zero JavaScript** — theme switchi are pure CSS + GET forms, and menus are the platform's own [popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API): a `'); + assert.equal(flat(await render({ id: "m" })), ''); }); test("menu demands an id — a trigger wired to nothing is a dead button, so say so", async () => { diff --git a/src/ui/shell.test.ts b/src/ui/shell.test.ts index 79e91b2..b062e73 100644 --- a/src/ui/shell.test.ts +++ b/src/ui/shell.test.ts @@ -42,9 +42,10 @@ test("app shell renders sidebar, topbar and the content slot", async () => { // The profile trigger opens that panel — the browser dismisses it on a click outside or Esc. assert.match(html, /
style="min-width:<%= typeof width === "number" ? width + "px" : width %>"<% } %>> +
diff --git a/views/partials/shell.ejs b/views/partials/shell.ejs index cee5de7..29c2fdf 100644 --- a/views/partials/shell.ejs +++ b/views/partials/shell.ejs @@ -60,7 +60,7 @@ <%# Signed in: the same popover block as the menu partial, hand-rolled because this one's trigger composes escaped user values and its item is a CSRF POST form, neither of which the partial's Item shapes cover (AGENTS.md). Keep the two in step. %> - + - + <% } else if (!hideSignIn) { %> <%# anonymous (a public page in the shell): no session to end — offer a way in instead. signInHref carries this page as return_to (chrome.signInHref); falls back to bare /login. @@ -84,7 +84,7 @@
<%= t("shell.signIn") %> <% } %> - <%- include("locale-switch") %> + <%- include("locale-switch", { localeMenuId: "chrome-locale-menu" }) %>