mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Vue kit: the small surfaces' buttons and glyphs are kit controls
Every hand-written <button> in the locale picker, phone tab bar, globe actions (Clear, Share, Reset) and compass, imagery divider handle, scene sharing dialog, layer group index, title logo, Exit clean view, the HUD's cockpit entry, News card face, rail card header, layer row toggle, credits line's Data attribution and the camera calibration chips is a ghost UiButton keeping its id, classes, data-*, aria-* and listeners. Their Material Symbols spans (tab icons, globe actions, compass needle, cockpit entry, celestial ring sun and moon) are UiIcons with :size="null". The Omnibar guide's extra rings, one per further target of a step, are now drawn by OmnibarGuide.vue from view.subRings instead of being built in script; startGuide() still reads them from the rendered tree and sets their boxes each frame. A UiButton's slot renders inside the button, so under an owner that patches synchronously (News cards, rail cards, the credits line, the Omnibar guide's Skip, Offer and Next) a change the button's attributes do not carry would land a tick late. Those slots are given under a named condition that is always true (v-if="redrawWithView"), which Vue redraws with the view. src/ui/kit/smallSurfacesControls.test.mjs pins it; docs/VUE-MIGRATION.md describes the surface and the conditional slot. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
e705fdea82
commit
40cbe52782
26 files changed
+383
-131
No files matched your search
+27
-5
@@ -158,6 +158,22 @@ while a query is typed. The Filter button opens a disclosure and carries
|
||||
a `UiIcon` with `:size="null"`, so `layer-finder.css` still sizes them
|
||||
(`src/ui/kit/layerFinderControls.test.mjs` pins it); the search field's
|
||||
magnifier is `UiSearchField`'s own span.
|
||||
The small surfaces' buttons are ghost `UiButton`s: the locale picker's
|
||||
button, the phone tab bar's tabs, the globe actions' Clear, Share, Reset
|
||||
and north-up compass, the imagery divider's handle, the scene sharing
|
||||
dialog's buttons, the layer group index's ticks, the title logo, Exit
|
||||
clean view, the HUD's cockpit entry, a News card's face, a rail card's
|
||||
header, a layer row's toggle, the credits line's Data attribution and the
|
||||
camera calibration chips. None is a pressed toggle; the disclosures keep
|
||||
`aria-expanded`. Their Material glyphs (the tabs', the globe actions', the
|
||||
compass needle, the cockpit entry's and the celestial ring's sun and moon)
|
||||
are `UiIcon`s with `:size="null"`, so the site rules still size them. The
|
||||
locale picker's globe, caret and check and a News card's category icon stay
|
||||
inline SVG. The Omnibar guide draws the extra rings of a step with several
|
||||
targets in its template, as many as `view.subRings` says, rather than
|
||||
building them in script; the Omnibar's one other `material-symbols-outlined`
|
||||
is a stylesheet selector, and the layer disclosure only names a button in a
|
||||
comment (`src/ui/kit/smallSurfacesControls.test.mjs` pins it).
|
||||
`UiSelect` renders the bare native select (Core's labels sit outside it or
|
||||
come as an `aria-label`) with `v-model`, `options` and `disabled`;
|
||||
options that carry their own attributes come through the slot, a caller's
|
||||
@@ -263,11 +279,17 @@ 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.
|
||||
`t()` is reactive only while the locale is bound to a ref (the app binds
|
||||
it to vue-i18n's). Words a view passes to a kit component as a prop
|
||||
(`UiCloseButton`'s `label`) follow the view's render at once. Words and
|
||||
props read in a kit component's slot follow a tick later, in the child's
|
||||
own update, and never when the locale is unbound; a slot that reads a
|
||||
`v-for` variable is already redrawn with its view. A view whose owner
|
||||
patches synchronously and reads the result at once (a News card, a rail
|
||||
card, the credits line, the Omnibar guide's buttons) gives such a slot
|
||||
under a named condition that is always true
|
||||
(`<template v-if="redrawWithView" #default>`): Vue redraws a conditional
|
||||
slot whenever its view is drawn.
|
||||
|
||||
## Phases
|
||||
|
||||
|
||||
Reference in new issue
Block a user