diff --git a/changelog.d/1847-kit-sweep-omnibar.md b/changelog.d/1847-kit-sweep-omnibar.md new file mode 100644 index 0000000000..7d52cede37 --- /dev/null +++ b/changelog.d/1847-kit-sweep-omnibar.md @@ -0,0 +1,2 @@ +- The Omnibar's mic, suggestion strip chips and glyphs are now kit controls, + with the same look and behaviour (manjunath22466, samehkhamis, #1847). diff --git a/changelog.d/1848-kit-sweep-welcome.md b/changelog.d/1848-kit-sweep-welcome.md new file mode 100644 index 0000000000..d3154e0195 --- /dev/null +++ b/changelog.d/1848-kit-sweep-welcome.md @@ -0,0 +1,2 @@ +- The welcome card's buttons and glyphs are now kit controls, with the same + look and behaviour (manjunath22466, samehkhamis, #1848). diff --git a/changelog.d/1849-kit-sweep-display.md b/changelog.d/1849-kit-sweep-display.md new file mode 100644 index 0000000000..cabf38e8d2 --- /dev/null +++ b/changelog.d/1849-kit-sweep-display.md @@ -0,0 +1,2 @@ +- The Visual panel's buttons and glyphs are now kit controls, with the same + look and behaviour (manjunath22466, samehkhamis, #1849). diff --git a/changelog.d/1850-kit-sweep-entity-card.md b/changelog.d/1850-kit-sweep-entity-card.md new file mode 100644 index 0000000000..06d464488e --- /dev/null +++ b/changelog.d/1850-kit-sweep-entity-card.md @@ -0,0 +1,2 @@ +- The entity card's buttons and glyphs are now kit controls, with the same + look and behaviour (manjunath22466, samehkhamis, #1850). diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index 5b16a0b61f..0c073a082d 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -83,12 +83,49 @@ segmented group in Core is a `UiSegmented`; the old `segmentedControl.js` adapter is gone. `UiButton` adds `pressedClass`, Core's class on a pressed toggle (most use `active`); its pressed classes toggle through `classList`, so a class other -code adds (a voice highlight) survives a press. Every pressed toggle in the -views is a `UiButton` except Bhote Koshi's cinematic button and the -tilt-map button, whose owners still write their state into the DOM. Core's +code adds (a voice highlight) survives a press. Not every pressed toggle in +the views is one yet: the context view, +the Stories screens and a few panel buttons still hand-write theirs, and +Bhote Koshi's cinematic button and the tilt-map button have owners that +write their state into the DOM. Core's pressable chips and pills (rail card chips, map sources, cities and places) 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` +rather than `disabled`, so they stay focusable while the card is busy. Its +tile, tip, Stories and arrow glyphs are `UiIcon`s with `:size="null"`, so +first-run.css still sizes them (`src/ui/kit/welcomeControls.test.mjs` pins +it). God mode's preview globe and callouts stay inline SVG drawings, and +its outbound links stay links. +The Omnibar's mic (a pressed toggle with `active`) and its suggestion +strip's chips (options, so `aria-current` rather than `pressed`) are +ghost `UiButton`s, and its search, row and chip glyphs are `UiIcon`s with +`:size="null"`, so its own rules still size them +(`src/ui/kit/omnibarControls.test.mjs` pins it). The mic's and the chat +row's glyphs stay inline SVG, since no Material symbol the page loads +draws them, and its field is its own combobox rather than a +`UiSearchField`. +The Visual panel's buttons (its presets and map sources, HUD, Sonar, +Detection, 3D, Clean UI, Celestial, Bloom, Sharpen and Reset to default) are +ghost `UiButton`s. HUD, Sonar, 3D, Celestial, Bloom and Sharpen are +pressed toggles with `active` as their pressed class; Detection sets its own +`active` and `panoptic` classes, and Clean UI is not a pressed toggle (its +owner marks it `active`). The panel's Scope, Celestial, +sky, application-row and Reset glyphs are `UiIcon`s with `:size="null"`, so +the panel's rules still size them (`src/ui/kit/visualControls.test.mjs` pins +it). The toggles' other glyphs (◎ ▣ ✈ □ ✨ 🔍) and the presets' style glyphs +are text characters, not Material symbols, and stay plain spans. +The entity card's buttons are ghost `UiButton`s: its four preview buttons +(Photos, Route, 3D, Cockpit view) are pressed toggles with `active`, Follow +is one with `entity-card__action--on`, and the cockpit entry, Fly to and +Ask GEV are plain buttons; so are the camera preview's bigger-view and More +info buttons and the nearby lists' rows (`SpotConditions`, which the +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 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 dbb9284655..c59828ba6e 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1344,6 +1344,10 @@ "src/ui/kit/UiDialog.test.mjs", "src/ui/kit/dialogs.test.mjs", "src/ui/kit/layerFinderControls.test.mjs", + "src/ui/kit/entityCardControls.test.mjs", + "src/ui/kit/visualControls.test.mjs", + "src/ui/kit/welcomeControls.test.mjs", + "src/ui/kit/omnibarControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/scripts/qa-firstrun-mutations.mjs b/scripts/qa-firstrun-mutations.mjs index 7177daceee..9bce1d3fd6 100644 --- a/scripts/qa-firstrun-mutations.mjs +++ b/scripts/qa-firstrun-mutations.mjs @@ -444,14 +444,14 @@ const MUTATIONS = [ { defect: 'a mission tile is dropped from the menu', file: 'html', - from: ' +

{{ t(TITLES[step - 1]) }}

{{ t(TITLES[step - 1]) }}

@@ -207,22 +209,22 @@ function onSuppress(event) {

{{ t('Start with') }}

- - - +
@@ -230,17 +232,17 @@ function onSuppress(event) {
diff --git a/src/ui/views/panels/CctvPreview.vue b/src/ui/views/panels/CctvPreview.vue index 96e7ad2f33..3071710542 100644 --- a/src/ui/views/panels/CctvPreview.vue +++ b/src/ui/views/panels/CctvPreview.vue @@ -4,7 +4,9 @@ import { storeToRefs } from 'pinia'; import { t } from '../../../i18n/index.js'; import { useCctvStore } from '../../stores/cctv.js'; import { usePanelChromeStore } from '../../stores/panelChrome.js'; +import UiButton from '../../kit/UiButton.vue'; import UiCloseButton from '../../kit/UiCloseButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; // A selected camera's card: a thumbnail of its latest frame, a few facts, // and a button that opens the full CCTV panel. The frame and facts come from @@ -68,15 +70,15 @@ function openPanel() { {{ t('Acquiring frame…') }} {{ sourceBadge.label }} - + + + - + + {{ t('More info') }} + diff --git a/src/ui/views/panels/DisplayPanel.vue b/src/ui/views/panels/DisplayPanel.vue index 9b634febaf..a384714c16 100644 --- a/src/ui/views/panels/DisplayPanel.vue +++ b/src/ui/views/panels/DisplayPanel.vue @@ -12,6 +12,7 @@ import UiSlider from '../../kit/UiSlider.js'; import { useDisplayStore } from '../../stores/display.js'; import UiButton from '../../kit/UiButton.vue'; import UiCheckbox from '../../kit/UiCheckbox.vue'; +import UiIcon from '../../kit/UiIcon.vue'; import UiSelect from '../../kit/UiSelect.js'; import { StyleParameterRows } from '../../styleParameters.js'; import VisualPresets from './VisualPresets.vue'; @@ -85,10 +86,10 @@ const allocationOptions = computed(() => [

{{ t('Overlay') }}

- +
{{ t('Layout') }} @@ -184,7 +185,7 @@ const allocationOptions = computed(() => [
- + {{ t('Scope') }}
@@ -198,21 +199,21 @@ const allocationOptions = computed(() => [ {{ pct(scopeOpacity) }}
- +

{{ t('Effects') }}

- + {{ t('Celestial') }}
- + {{ row.label }}
@@ -225,7 +226,7 @@ const allocationOptions = computed(() => [
- +
{{ pct(view?.bloom.intensity ?? 0) }}
- +
{{ pct(view?.sharpen.intensity ?? 49) }}
- + + {{ t('Reset to default') }} +
diff --git a/src/ui/views/panels/EntityCard.vue b/src/ui/views/panels/EntityCard.vue index 77ae67c486..fd787d97fc 100644 --- a/src/ui/views/panels/EntityCard.vue +++ b/src/ui/views/panels/EntityCard.vue @@ -10,7 +10,9 @@ import AltitudeGraph from './AltitudeGraph.vue'; import { contextNeedle, contextSearchText, matchesContextSearch } from '../../contextSearch.js'; import RouteGlobe from './RouteGlobe.vue'; import CctvPreview from './CctvPreview.vue'; +import UiButton from '../../kit/UiButton.vue'; import UiCloseButton from '../../kit/UiCloseButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; import { useCctvStore } from '../../stores/cctv.js'; import SpotConditions from './SpotConditions.vue'; import { shownLayerName } from '../../layerNames.js'; @@ -365,10 +367,10 @@ watch(
- - - - + + + {{ t('3D') }} +
@@ -379,7 +381,7 @@ watch(
- +
{{ factFigure(fact).number }}{{ factFigure(fact).unit }} @@ -391,7 +393,7 @@ watch(
- +
{{ kindLine }}

{{ shownTitle }}

@@ -406,14 +408,14 @@ watch(
{{ card.route.from }} {{ card.route.to }}
@@ -435,7 +437,7 @@ watch( class="entity-card__route-note" :title="t('The scheduled route for this flight number does not match where the plane is; it may be another leg of the same flight.')" > - {{ t('Scheduled · unverified: does not match where the plane is') }} + {{ t('Scheduled · unverified: does not match where the plane is') }}

@@ -462,20 +464,21 @@ watch(
- + + {{ card.layerId === 'satellites' ? t('Enter orbital view') : t('Enter Cockpit') }} +
- - + + {{ t('Fly to') }} + + + {{ store.isFollowing() ? t('Following') : t('Follow') }} +
- +
diff --git a/src/ui/views/panels/Omnibar.vue b/src/ui/views/panels/Omnibar.vue index 7962cb346b..8e08b8d70e 100644 --- a/src/ui/views/panels/Omnibar.vue +++ b/src/ui/views/panels/Omnibar.vue @@ -16,6 +16,8 @@ import { useGlobeActionsStore } from '../../stores/globeActions.js'; import { useLocationStore } from '../../stores/location.js'; import { useOmnibarStore } from '../../stores/omnibar.js'; import { useVoiceStore } from '../../stores/voice.js'; +import UiButton from '../../kit/UiButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; // One field for places, layers and questions. Places run through the location // controls, layers through the shell's omnibar actions, and anything else can @@ -1028,7 +1030,7 @@ watch(
- + - +
@@ -1065,11 +1067,10 @@ watch(
  • - + {{ item.label }} {{ item.hint }} diff --git a/src/ui/views/panels/SpotConditions.vue b/src/ui/views/panels/SpotConditions.vue index 225279625c..9b2b92dce8 100644 --- a/src/ui/views/panels/SpotConditions.vue +++ b/src/ui/views/panels/SpotConditions.vue @@ -5,6 +5,8 @@ import { compassName, hazardsNear, regionalBrief, weatherLook } from '../../spot import { distanceKm } from '../../../data/entityContext.js'; import { CONTEXT_RADIUS_STEPS, contextRadiusKm, setContextRadiusKm } from '../../contextRadius.js'; import { contextNeedle, matchesContextSearch } from '../../contextSearch.js'; +import UiButton from '../../kit/UiButton.vue'; +import UiIcon from '../../kit/UiIcon.vue'; import UiSlider from '../../kit/UiSlider.js'; import { sayWords, useEntityCardStore } from '../../stores/entityCard.js'; import { useOmnibarStore } from '../../stores/omnibar.js'; @@ -265,7 +267,7 @@ const sources = computed(() => {