From 9f8a4cb39d3cf272d9441fd9036fc3d0999e1d3a Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 23:42:55 -0800 Subject: [PATCH] Vue kit: the kit's classes wear Core's standard looks UiButton gains styled variants beside the unstyled default ghost: action (the gev-action-button surface, tone="danger" and size="compact"), primary (that surface with the scene panel's main-action accent) and icon (the panel collapse toggle's square glyph button). A pressed styled button looks as a hovered one does. UiChip wears the read-only chip (now chip.css, shared with the news chips), UiEmpty the one-line empty state (now empty-state.css, shared with the news readout), and UiBadge and UiSegmented carry their skins through the kit's own classes too. Every kit selector shares one selector list with the Core skin it comes from, in skins loaded before the feature stylesheets, so no rule is copied and feature classes still win. The app renders as before: the voice card chip and the Recent Imagery and Authoring empty states keep their own type by inheriting it, and the dock pin buttons drop variant="icon", which they never wore. kitStyles.test.mjs pins the shared rules. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 23 ++++- scripts/format-scope.json | 3 + src/ui/kit/UiBadge.vue | 10 ++- src/ui/kit/UiButton.test.mjs | 47 ++++++++++ src/ui/kit/UiButton.vue | 36 ++++++-- src/ui/kit/UiChip.vue | 7 +- src/ui/kit/UiEmpty.vue | 5 +- src/ui/kit/UiSegmented.vue | 4 +- src/ui/kit/kitStyles.test.mjs | 135 ++++++++++++++++++++++++++++ src/ui/railPanelChrome.test.mjs | 5 +- src/ui/styles/action-button.css | 34 ++++++- src/ui/styles/chip.css | 23 +++++ src/ui/styles/controls.css | 6 ++ src/ui/styles/empty-state.css | 15 ++++ src/ui/styles/news.css | 28 +----- src/ui/styles/recent-imagery.css | 4 + src/ui/styles/scenes.css | 14 ++- src/ui/styles/segmented-control.css | 11 ++- src/ui/styles/status-badge.css | 5 +- src/ui/styles/voice-card.css | 3 + src/ui/views/CommandDockView.vue | 4 +- style.css | 2 + 22 files changed, 363 insertions(+), 61 deletions(-) create mode 100644 src/ui/kit/kitStyles.test.mjs create mode 100644 src/ui/styles/chip.css create mode 100644 src/ui/styles/empty-state.css diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index c2abe2253c..23aae3a669 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -42,9 +42,26 @@ one-panel rule too. Share links continue to record which panels are open. 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 -are styled by the existing stylesheet and custom properties; a kit class such as -`ui-button--icon` carries no Core style yet, and a converted control keeps -its own classes beside it. They contain no application state. +are styled by the existing stylesheet and custom properties, and they contain +no application state. The kit's own classes wear Core's standard looks, each +sharing one selector list with the Core skin it comes from, so the rules are +never copied: + +| Kit class | Look | Rules | +| --- | --- | --- | +| `UiButton` `variant="ghost"` (default) | none: the caller's classes style it | — | +| `UiButton` `variant="action"` | the action surface (`gev-action-button`); `tone="danger"` hovers red, `size="compact"` is the shot-row footprint | `src/ui/styles/action-button.css` | +| `UiButton` `variant="primary"` | the action surface with a group's main-action accent | `src/ui/styles/action-button.css` | +| `UiButton` `variant="icon"` | the 22px square glyph button of a panel's collapse toggle | `src/ui/styles/controls.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` | +| `UiSegmented` | the segmented control (`gev-segmented`, `gev-segment`) | `src/ui/styles/segmented-control.css` | + +A pressed action, primary or icon button looks as a hovered one does. Each +look's resting rule selects one kit class, in a skin loaded before the feature +stylesheets, so a feature class still wins; and a converted control keeps its own classes +beside the kit's. `src/ui/kit/kitStyles.test.mjs` pins these rules. `UiPanel` takes a `title`, slots and `v-model:collapsed`, but its `collapsed` drives only the button and `ui-panel--collapsed`: the root's `collapsed` class, which hides the body, is drawn at once by `v-panel-state` diff --git a/scripts/format-scope.json b/scripts/format-scope.json index 080febd46b..1c5a01c0cc 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1328,6 +1328,9 @@ "src/ui/kit/UiBadge.vue", "src/ui/kit/UiBadge.test.mjs", "src/ui/kit/UiEmpty.vue", + "src/ui/kit/kitStyles.test.mjs", + "src/ui/styles/chip.css", + "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", "src/ui/displayPanelActions.test.mjs", "src/testSupport/vueDom.mjs", diff --git a/src/ui/kit/UiBadge.vue b/src/ui/kit/UiBadge.vue index 45d8f7ede6..610e913938 100644 --- a/src/ui/kit/UiBadge.vue +++ b/src/ui/kit/UiBadge.vue @@ -1,8 +1,10 @@