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:
Sameh KhamisandManjunath Paparaju committed 2026-11-19 10:44:16 -08:00
1 parent e705fdea82
commit 40cbe52782
26 files changed
+383 -131

No files matched your search

+3 -3
View File
@@ -1,6 +1,7 @@
<script setup>
import { onBeforeUnmount, onMounted, ref } from 'vue';
import { t } from '../../../i18n/index.js';
import UiButton from '../../kit/UiButton.vue';
// A slim index beside the Data Layers list: one tick per group (Movement,
// Cameras, Infrastructure…). Hovering a tick names its group, clicking it
@@ -102,10 +103,9 @@ onBeforeUnmount(() => {
<template>
<nav v-if="sections.length > 1" class="layer-section-index" :aria-label="t('Layer groups')">
<button
<UiButton
v-for="section in sections"
:key="section.i"
type="button"
class="layer-section-index__tick"
:class="{ 'is-current': section.i === current }"
:aria-label="t('Jump to {name}', { name: section.label })"
@@ -115,7 +115,7 @@ onBeforeUnmount(() => {
@mouseleave="hideTip"
@focus="showTip($event, section)"
@blur="hideTip"
></button>
></UiButton>
<Teleport to="body">
<span v-if="tip" class="layer-section-index__label"
:class="{ 'layer-section-index__label--before': tip.before }" :style="{ left: tip.left, top: tip.top }" aria-hidden="true">{{ tip.label }}</span>