From 2d7b7be890f06b39237dfb26adec7f5c58ae6596 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 00:59:13 -0800 Subject: [PATCH 1/2] Vue kit: UiCheckbox for the Visual, voice, Data Library and welcome checkboxes UiCheckbox is a label wrapping a native checkbox and its words; trailing puts the box after them, as the Visual panel's rows have it. v-model shows the value and emits the checked state, and change is emitted with its event; without a modelValue the box is the browser's own, as the welcome card's "Don't show this again" is. restore puts the box back to modelValue once a change has rendered without the owner taking it, which is what the voice panel's v-checked directive did for a refused preference. Attributes go to the label; inputId and inputAttrs to the box. checkbox.css holds the centred flex row, moved out of the two labels that hold only a checkbox (first-run.css, library.css) and loaded before them. Each box keeps its skin's size, margin and accent colour. checkboxes.test.mjs fails if a view writes a checkbox by hand; Story Explore's filters are not converted yet. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 18 ++- scripts/format-scope.json | 4 + scripts/package-boundaries.json | 1 + scripts/qa-firstrun-mutations.mjs | 6 +- src/firstRunExperience.test.mjs | 5 +- src/hudA11y.test.mjs | 3 +- src/ui/kit/UiCheckbox.test.mjs | 162 ++++++++++++++++++++++ src/ui/kit/UiCheckbox.vue | 57 ++++++++ src/ui/kit/checkboxes.test.mjs | 70 ++++++++++ src/ui/kit/kitStyles.test.mjs | 29 ++++ src/ui/styles/checkbox.css | 9 ++ src/ui/styles/first-run.css | 2 - src/ui/styles/library.css | 2 - src/ui/views/WelcomeView.vue | 9 +- src/ui/views/panels/DataLibraryDialog.vue | 14 +- src/ui/views/panels/DisplayPanel.vue | 16 +-- src/ui/views/panels/VoiceControl.vue | 18 +-- style.css | 1 + 18 files changed, 385 insertions(+), 41 deletions(-) create mode 100644 src/ui/kit/UiCheckbox.test.mjs create mode 100644 src/ui/kit/UiCheckbox.vue create mode 100644 src/ui/kit/checkboxes.test.mjs create mode 100644 src/ui/styles/checkbox.css diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index f9b1b11213..16e659f84a 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -38,7 +38,7 @@ one-panel rule too. Share links continue to record which panels are open. `src/ui/kit/` holds the generic components: `UiRail`, `UiTooltip`, `UiIcon`, `UiButton`, `UiCloseButton`, `UiPanel`, `UiSegmented`, `UiSlider`, `UiChip`, -`UiSelect`, `UiSearchField`, `UiBadge` and `UiEmpty` so far, with more +`UiSelect`, `UiSearchField`, `UiCheckbox`, `UiBadge` and `UiEmpty` so far, with more joining as the controls they serve are converted. One component serves every use of a control, with props for the differences (`UiPanel`'s `sideways`, `glow`, `scroll`), rather than a copy per panel. The components @@ -55,6 +55,7 @@ never copied: | `UiButton` `variant="icon"` | the 22px square glyph button of a panel's collapse toggle | `src/ui/styles/controls.css` | | `UiCloseButton` | a close, dismiss or clear button: a bare glyph (× with `glyph="times"`, the Material `close` symbol with `glyph="icon"`) with no padding, border or background of its own and a pointer; the site's feature class sets size, colour, hover and any surface, and `bare` leaves the look off for a skin that keeps the browser's padding | `src/ui/styles/close-button.css` | | `UiSearchField` | a search field: the Material `search` glyph and a search input in a flex row, the input bare (no border or background, free to shrink); the site's feature classes set the frame's size, surface and focus ring and the input's type and outline, and the browser's own cancel button is left to each skin | `src/ui/styles/search-field.css` | +| `UiCheckbox` | a checkbox: a label wrapping a native box and its words in a centred flex row; the box keeps each site's size, margin and accent colour, and the site's feature class sets the row's gap, direction and colour | `src/ui/styles/checkbox.css` | | `UiChip` | the read-only chip (a pill of uppercase mono text); `selected` takes the accent | `src/ui/styles/chip.css` | | `UiEmpty` | the one-line empty state (dim mono text), its hint on a line below | `src/ui/styles/empty-state.css` | | `UiBadge` | the read-only badge (`gev-status-badge`) | `src/ui/styles/status-badge.css` | @@ -120,6 +121,21 @@ focuses the input. The Context search and the Layer Finder's are `UiSearchField`s; the locale picker's combobox, the Omnibar's location field and the Data Library's labelled search are other controls. Its kit rules hold the declarations both search skins had in common, moved rather than copied, and load before them. +`UiCheckbox` is a `