From 14b6d1cc135ca345209dde2763c294874eba7552 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 12:27:40 -0800 Subject: [PATCH] Vue kit: missions', Contacts', Radio's and key setup's buttons and glyphs are kit controls The Space Missions panel's buttons (a mission's roster row, FOCUS, the replay's pause, PREV, NEXT and SHOW ALL / DESELECT, beside REPLAY ASCENT and the two closes that already were), the Contacts panel's PREV, FOCUS, NEXT and contact rows, the Radio panel's PREV, PLAY, NEXT and STOP, the RTL-SDR card's Locate, Change device, Tune and the two seeks, and the key setup's POWER UP chip, REMOVE, voice auth toggle and SAVE KEYS are ghost UiButtons keeping their ids, classes, data-*, aria-*, titles and listeners. PLAY and Locate keep their own active class (their words change with their state), so they gain no aria-pressed. The chip's bolt is a UiIcon with :size="null", so provider-settings.css still sizes it. The card's FM frequency stays a native number field (the kit has none) and the radio tuner's range stays native, as documented. None of these owners renders synchronously, so no slot needs redrawWithView. src/ui/kit/missionsRadioControls.test.mjs pins it; docs/VUE-MIGRATION.md describes the surface and no longer calls the key setup chip a plain button. radioPanel.test.mjs reads PLAY's Core classes without the kit's. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 21 +++- scripts/format-scope.json | 1 + src/ui/kit/missionsRadioControls.test.mjs | 142 ++++++++++++++++++++++ src/ui/radioPanel.test.mjs | 6 +- src/ui/views/ProviderSettingsView.vue | 14 ++- src/ui/views/panels/AwarenessPanel.vue | 9 +- src/ui/views/panels/MissionDetail.vue | 10 +- src/ui/views/panels/MissionRoster.vue | 3 +- src/ui/views/panels/RadioPanel.vue | 8 +- src/ui/views/panels/SdrCard.vue | 10 +- 10 files changed, 193 insertions(+), 31 deletions(-) create mode 100644 src/ui/kit/missionsRadioControls.test.mjs diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index 254ab1152b..ce11b39e45 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -97,9 +97,9 @@ 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, 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. +sources, cities and places, the view context's place and layer chips and +the key setup chip) are `UiButton`s too. `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: the start tiles are pressed toggles, and all but SKIP keep `aria-disabled` @@ -175,6 +175,21 @@ 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 Space Missions panel's buttons (a mission's roster row, FOCUS, +REPLAY ASCENT, the replay's pause, PREV, NEXT and SHOW ALL / DESELECT), +the Contacts panel's (PREV, FOCUS, NEXT and a contact's row), the Radio +panel's (Enable, PREV, PLAY, NEXT and STOP), the RTL-SDR card's (Connect, +Locate, Change device, FM, ADS-B, Tune and the two seeks) and the key +setup's (the POWER UP chip, a key's REMOVE, the voice auth toggle and +SAVE KEYS) are ghost `UiButton`s. Radio's Enable and the card's Connect, +FM and ADS-B are pressed toggles with `active`; PLAY and Locate keep +their own `active` class without `aria-pressed`, since their words say +what they will do or have done. The chip's bolt is a `UiIcon` with +`:size="null"`, so provider-settings.css still sizes it +(`src/ui/kit/missionsRadioControls.test.mjs` pins it). The card's FM +frequency stays a native number field, which the kit has no control for, +and the replay's pause, the roster's chevron and the compass arrows are +text characters, not Material symbols. `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 diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 9cbc1bda9a..6f91e3d2d9 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1351,6 +1351,7 @@ "src/ui/kit/omnibarControls.test.mjs", "src/ui/kit/storiesControls.test.mjs", "src/ui/kit/commandDockControls.test.mjs", + "src/ui/kit/missionsRadioControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/src/ui/kit/missionsRadioControls.test.mjs b/src/ui/kit/missionsRadioControls.test.mjs new file mode 100644 index 0000000000..5604a6517c --- /dev/null +++ b/src/ui/kit/missionsRadioControls.test.mjs @@ -0,0 +1,142 @@ +// The space missions, Contacts, Radio and provider settings controls are the +// kit's: none of their views hand-writes a + diff --git a/src/ui/views/panels/MissionRoster.vue b/src/ui/views/panels/MissionRoster.vue index 8c6a6aa130..39eaaae3ab 100644 --- a/src/ui/views/panels/MissionRoster.vue +++ b/src/ui/views/panels/MissionRoster.vue @@ -3,6 +3,7 @@ import { storeToRefs } from 'pinia'; import { onBeforeUpdate, onUpdated, ref } from 'vue'; import { t } from '../../../i18n/index.js'; import { useSpaceMissionsStore } from '../../stores/spaceMissions.js'; +import UiButton from '../../kit/UiButton.vue'; import UiEmpty from '../../kit/UiEmpty.vue'; // The Space Missions roster. The launches layer presents it; until it does, @@ -72,7 +73,7 @@ onUpdated(() => {
- + {{ entry.label }}{{ entry.provider }} · {{ entry.date }}

{{ t('TAB PREVIEWS · ENTER / SPACE SELECTS') }}

diff --git a/src/ui/views/panels/RadioPanel.vue b/src/ui/views/panels/RadioPanel.vue index 67a8f75439..6bd5e4e8ec 100644 --- a/src/ui/views/panels/RadioPanel.vue +++ b/src/ui/views/panels/RadioPanel.vue @@ -52,10 +52,10 @@ const radioWords = computed(() => ({
- - - - + {{ t('PREV') }} + {{ radio ? radio.transport.play.text : t('PLAY') }} + {{ t('NEXT') }} + {{ t('STOP') }}