diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index a64d55e0c9..30434445d3 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -89,6 +89,15 @@ tilt-map button, whose owners still 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 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. `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 7dc54bc407..c0f72c687c 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1343,6 +1343,7 @@ "src/ui/kit/UiDialog.vue", "src/ui/kit/UiDialog.test.mjs", "src/ui/kit/dialogs.test.mjs", + "src/ui/kit/entityCardControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/src/ui/kit/entityCardControls.test.mjs b/src/ui/kit/entityCardControls.test.mjs new file mode 100644 index 0000000000..5dd3f24587 --- /dev/null +++ b/src/ui/kit/entityCardControls.test.mjs @@ -0,0 +1,84 @@ +// The entity card's buttons and Material glyphs are the kit's: neither its +// template nor the camera preview and nearby lists it renders hand-writes a +// + + + - + + {{ t('More info') }} + 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/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(() => {