From f9ca76df98db4212db72406e3569f76de40a621d Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 10:08:57 -0800 Subject: [PATCH] Vue kit: the command dock's and Context's buttons and glyphs are kit controls The command dock's six style buttons, its two tray toggles, Location's collapse and the search toggle are ghost UiButtons. The style buttons are pressed toggles with `active` as their pressed class (Normal is pressed until a style is published), so they now carry aria-pressed. The Context panel's two tabs, Contacts, the cockpit entry and SEARCH NEARBY SITES are ghost UiButtons; the tabs and Contacts stay role="tab" controls with aria-selected and their own active class. The view context it shows while nothing is picked (an off layer's worldwide tile, an item's row, the place and layer chips and Ask GEV) is on the kit too; the worldwide tile is a div or a UiButton rather than a dynamic component. Every Material glyph in the three templates is a UiIcon with :size="null", so the site rules still size them; an item's motion glyph keeps role="img" and its name, with the kit's aria-hidden taken off. src/ui/kit/commandDockControls.test.mjs pins it; the markup tests that matched the old button source or class text read the kit's markup, and docs/VUE-MIGRATION.md describes the surface. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 21 +++- scripts/format-scope.json | 1 + src/cockpitMarkup.test.mjs | 6 +- src/contextTabKeyboard.test.mjs | 6 +- src/mapSourceFocus.test.mjs | 2 +- src/mapStackChips.test.mjs | 2 +- src/ui/contextPanel.test.mjs | 5 +- src/ui/kit/commandDockControls.test.mjs | 127 ++++++++++++++++++++++++ src/ui/views/CommandDockView.vue | 38 +++---- src/ui/views/ContextView.vue | 28 +++--- src/ui/views/panels/ViewContext.vue | 49 +++++---- 11 files changed, 223 insertions(+), 62 deletions(-) create mode 100644 src/ui/kit/commandDockControls.test.mjs diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index d82f798808..254ab1152b 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -97,8 +97,8 @@ header's search and expand, the imported files' row actions and the rail chips' icons), the glyphs are `UiIcon`s with `:size="null"`, so the site rules still size them. Core's pressable chips and pills (the rail cards' chips and action chips, Recent Imagery's day chips, SWAP and ZOOM IN, map -sources, cities and places) are `UiButton`s too; the view context's place -and layer chips and the key setup chip are still plain buttons. `UiChip` +sources, cities and places, and the view context's place and layer chips) +are `UiButton`s too; the key setup chip is still a plain button. `UiChip` is a non-interactive label chip, used by the voice card. The welcome card's buttons (SKIP, the three start tiles, BROWSE STORIES, BACK and the main NEXT / ENTER GOD MODE action) are ghost `UiButton`s: @@ -149,6 +149,23 @@ context view shows too). Their glyphs are `UiIcon`s with `:size="null"`, so entity-card.css and spot-conditions.css still size them (`src/ui/kit/entityCardControls.test.mjs` pins it). Ask GEV's chat bubble stays inline SVG, since no Material symbol the page loads draws it. +The command dock's buttons (the six style buttons, the two tray toggles, +Location's collapse and the search toggle, beside the pins and pills that +already were) are ghost `UiButton`s. The style buttons are pressed toggles +with `active` as their pressed class, so they now carry `aria-pressed`; +Normal is the pressed one until a style is published. Their glyphs, the +search 🔎 and the collapse + are text characters, not Material symbols, and +stay plain text. The Context panel's buttons (its two tabs, Contacts, the +cockpit entry and SEARCH NEARBY SITES, beside the header's search and +expand and the TR-3B chip) are ghost `UiButton`s; the tabs and Contacts +are `role="tab"` controls, chosen through `aria-selected` with their own +`active` class rather than `pressed`. The view context it shows while +nothing is picked (a worldwide tile that turns a layer on, an item's row, +the place and layer chips and Ask GEV) is on the kit too, and the glyphs of +all three are `UiIcon`s with `:size="null"`, so their site rules still size +them; an item's motion glyph keeps `role="img"` and its name, with the +kit's `aria-hidden` taken off (`src/ui/kit/commandDockControls.test.mjs` +pins it). Ask GEV's chat bubble stays inline SVG. The Layer Finder's buttons (Search, Filter, the filter menu's Status and Category options and the bar's two clear chips) are ghost `UiButton`s. Search and the options are pressed toggles; the options' pressed class is diff --git a/scripts/format-scope.json b/scripts/format-scope.json index ebfa59916f..9cbc1bda9a 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1350,6 +1350,7 @@ "src/ui/kit/welcomeControls.test.mjs", "src/ui/kit/omnibarControls.test.mjs", "src/ui/kit/storiesControls.test.mjs", + "src/ui/kit/commandDockControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/src/cockpitMarkup.test.mjs b/src/cockpitMarkup.test.mjs index 3a084af32f..8298dab6d8 100644 --- a/src/cockpitMarkup.test.mjs +++ b/src/cockpitMarkup.test.mjs @@ -194,12 +194,12 @@ test('Cockpit vision cycle exposes every map preset exactly once', () => { test('Contacts uses the approved radar icon', () => { const button = html.match( - / +
- - - - - - +
@@ -134,10 +134,10 @@ function selectMapSource(chip) {
- - + + +
{{ loc ? loc.status.city : t('📍 Location: --') }}
@@ -150,9 +150,9 @@ function selectMapSource(chip) {
{{ city.label }}
- +
diff --git a/src/ui/views/ContextView.vue b/src/ui/views/ContextView.vue index 17965350c7..3e3552bbb4 100644 --- a/src/ui/views/ContextView.vue +++ b/src/ui/views/ContextView.vue @@ -193,17 +193,17 @@ watch(
- - + + {{ t('Inspector') }} + + + {{ t('Properties') }} +
-

{{ t(tab.label) }}

+

{{ t(tab.label) }}

  • {{ layer.name }}
@@ -212,10 +212,10 @@ watch(
- +
{{ t('SELECT CONTEXT') }} @@ -223,11 +223,11 @@ watch(
- - + + {{ t('SEARCH NEARBY SITES') }} 🛸
diff --git a/src/ui/views/panels/ViewContext.vue b/src/ui/views/panels/ViewContext.vue index 15295c757c..326fee561d 100644 --- a/src/ui/views/panels/ViewContext.vue +++ b/src/ui/views/panels/ViewContext.vue @@ -10,7 +10,9 @@ import { shownLayerName } from '../../layerNames.js'; import { entityKind } from '../../../data/entityContext.js'; import SpotConditions from './SpotConditions.vue'; import SunDial from './SunDial.vue'; +import UiButton from '../../kit/UiButton.vue'; import UiCloseButton from '../../kit/UiCloseButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; import AltitudeGraph from './AltitudeGraph.vue'; // What the Context panel shows while nothing is picked: where the camera is @@ -284,7 +286,7 @@ const distance = (km) =>

{{ t('Globe view') }}