Vue kit: the docs' every-control claims hold, and a scan of every view pins them

docs/VUE-MIGRATION.md says every select is a UiSelect, every close button
a UiCloseButton and (nearly) every pressed toggle a UiButton. Make those
true in code, correct the sentences that were not, and pin them.

Selects: Story Explore's sort, the chat's layer picker and a layer row's
range ends are UiSelects. The range ends take `hold`, since the layer
panel repaints the row on a later frame.

Close buttons: the space mission replay's Cancel is a bare UiCloseButton.
An imported file's row actions (show or hide, fly to, remove) are icon
UiButtons drawing the icon the file import names, so Remove stays one of
them; the presenter's `pressed` is now a boolean.

Pressed toggles: the tilt-map button, the scene action buttons, the chat
and voice panels' dock (and its minimize), the Context header's search
and expand, Recent Imagery's day chips, SWAP and ZOOM IN, the rail row
lists and the rail cards' action chips are UiButtons with `pressed` (and
`pressed-class="active"` where their active class came from the same
state). Their Material glyphs, and the rail chips' icons, are UiIcons
with `:size="null"`. Bhote Koshi's cinematic button keeps the attributes
its layer writes, and Explore's story cards stay role="button" elements.

Docs: the kit list gains UiPanelToggle and UiPanelEdge; the pressed-toggle,
chips, Stories search fields, role="dialog", close button, range and
source-reading-tests sentences now say what the code does.

Tests: src/ui/kit/viewControls.test.mjs walks every .vue outside the kit
and fails on a raw select, a hand-written aria-pressed on a button,
UiButton or role="button" element (outside the two documented
exceptions), or a hand-written close glyph button. closeButtons.test.mjs
also catches a × inside a span.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-19 07:56:34 -08:00
1 parent 5dbd73b4e9
commit 1e70e15ceb
25 files changed
+381 -116

No files matched your search

+6 -5
View File
@@ -1,5 +1,6 @@
<script setup>
import { onMounted, onUpdated, ref } from 'vue';
import UiButton from '../kit/UiButton.vue';
// An ordered list whose rows keep their identity, so a focused row stays.
const props = defineProps({
@@ -10,7 +11,7 @@ const props = defineProps({
const root = ref(null);
const rowClass = (item) =>
`data-row-list-item${item.disabled ? ' note' : ''}${item.active ? ' active' : ''}${item.current ? ' current' : ''}`;
`data-row-list-item${item.disabled ? ' note' : ''}${item.current ? ' current' : ''}`;
// Follow the flight, but never steal a scroll the reader is making
// themselves: only when the step actually changed.
@@ -43,19 +44,19 @@ onUpdated(followCurrent);
v-for="item in list?.items ?? []"
:key="item.id"
:data-list-item-id="item.id"
><button
type="button"
><UiButton
:class="rowClass(item)"
:data-list-item-id="item.id"
:disabled="Boolean(item.disabled)"
:aria-current="item.current ? 'step' : 'false'"
:aria-pressed="item.active ? 'true' : 'false'"
:pressed="Boolean(item.active)"
pressed-class="active"
:title="String(item.text ?? '')"
@click="onSelect(item)"
><span class="data-row-list-lead">{{ String(item.lead ?? '') }}</span
><span class="data-row-list-text">{{
String(item.text ?? '')
}}</span></button
}}</span></UiButton
></li
></ol
>