Vue: the credits line and its Data attribution list are a single-file component

mountCreditsView() keeps its signature and stays the owner: it computes the
credits shown once each, keeps the list's open state and its focus, takes the
expand and close clicks and Escape, and renders CreditsView synchronously
(as the weather readout is rendered), so focus moves as soon as a change
returns. The view teleports the line and the list to the end of the body, as
the script appended them, so the page's rules that select them as children
of the body still apply; CreditItem draws one credit (its logo or its text,
only its linked words linked, links and logos kept only for a safe scheme).

The ids, classes, roles, aria attributes and text are unchanged. The list's
close button is a UiCloseButton with bare, keeping the browser's padding, so
it only gains the kit's classes, which carry no rules. The expand button
stays a plain button: its words are its content, which a UiButton slot would
not word again when the owner renders a new locale. The list's items are
keyed by credit, so a link that keeps its place keeps focus through a
redraw; one that goes still hands focus to the close button.

New tests: the line and list follow the locale, and they are the last of the
body with the kit's close button.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-19 01:58:47 -08:00
1 parent 1f34210f71
commit 0b06bc6645
7 files changed
+267 -126

No files matched your search

+17 -3
View File
@@ -108,8 +108,9 @@ no tip unless the site passes a `title`; attributes and classes pass through,
so each site keeps its id, feature class and look. Every close, dismiss and
clear button in the views is one (`src/ui/kit/closeButtons.test.mjs` pins
it); Street Level's and the space mission's keep `bare`, since their skins
keep the browser's padding. The close buttons built in script (credits, the
Quebec CCTV overlay, the guide) are not converted yet.
keep the browser's padding, and so does the credits list's. The close
buttons built in script (the Quebec CCTV overlay, the guide) are not
converted yet.
`UiSearchField` takes `v-model`, a required `label` (the input's
accessible name), `placeholder` and `tag` (`div`, given `role="search"` by
the site, or `label`); attributes and classes go to the frame, and
@@ -177,6 +178,12 @@ page declares no dark `color-scheme`. Selects and number fields are
and keeps native spinners dark; ranges are `.gev-quantitative-slider`, with
a feature supplying only its accent.
`t()` is not reactive. Words a view passes to a kit component as a prop
(`UiCloseButton`'s `label`) follow a locale change on the view's next
render, but words in a kit component's slot do not: the compiled slot does
not render the child again. A view whose words must follow the locale at
once passes the locale itself as a prop or key, as the credits line does.
## Phases
1. **Foundation.** Vue, Pinia and the Vite Vue plugin join the browser build
@@ -368,7 +375,14 @@ a feature supplying only its accent.
choices, DISMISS and "Don't show this again" call the launcher's
controls; a refused save hands the tick back to the view to revert. The
launcher still reads the rendered card for its hit test, keyboard trap,
focus and overflow measurement), then
focus and overflow measurement), the attribution line (for a renderer
without its own credit display, `mountCreditsView()` renders
`CreditsView` synchronously, as the weather readout is, and the view
teleports the line and its "Data attribution" list to the end of the
body, where the page's rules select them; the owner keeps the credits
shown, the list's open state and its focus, and words the view again
when the locale changes; the list's close button is a bare
`UiCloseButton`), then
Cockpit (in progress: `CockpitBriefing` renders the briefing card's
pages, cycle toggle, regional news and local conditions, and
`CockpitContext` the Contact card's scope, navigation, counts, nearest