From 1393a025b473b1d4ff5757853cc95a638764ece2 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 02:55:03 -0800 Subject: [PATCH 1/2] Vue kit: the Visual panel's buttons are UiButtons and its glyphs UiIcons HUD, Clean UI, Bloom, Sharpen and Reset to default are ghost UiButtons; HUD, Bloom and Sharpen are pressed toggles with the active class, as Sonar, 3D and Celestial already were. The Scope, Celestial, sky, application-row and Reset glyphs are UiIcons sized by the panel's own rules. The toggles' text glyphs stay plain spans, since they are characters rather than Material symbols. A guard test pins it, and the initial-markup test allows the kit classes beside the toggle's own. The migration notes no longer claim every pressed toggle is a UiButton. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 18 ++++++++-- scripts/format-scope.json | 1 + src/ui/displayPanel.test.mjs | 6 +++- src/ui/kit/visualControls.test.mjs | 53 ++++++++++++++++++++++++++++ src/ui/views/panels/DisplayPanel.vue | 31 ++++++++-------- 5 files changed, 90 insertions(+), 19 deletions(-) create mode 100644 src/ui/kit/visualControls.test.mjs diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index 35d0deffc9..b022fea3e4 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -83,12 +83,24 @@ segmented group in Core is a `UiSegmented`; the old `segmentedControl.js` adapter is gone. `UiButton` adds `pressedClass`, Core's class on a pressed toggle (most use `active`); its pressed classes toggle through `classList`, so a class other -code adds (a voice highlight) survives a press. Every pressed toggle in the -views is a `UiButton` except Bhote Koshi's cinematic button and the -tilt-map button, whose owners still write their state into the DOM. Core's +code adds (a voice highlight) survives a press. Not every pressed toggle in +the views is one yet: the entity card, the context view, the Layer Finder, +the Stories screens and a few panel buttons still hand-write theirs, and +Bhote Koshi's cinematic button and the tilt-map button have owners that +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 Visual panel's buttons (its presets and map sources, HUD, Sonar, +Detection, 3D, Clean UI, Celestial, Bloom, Sharpen and Reset to default) are +ghost `UiButton`s. HUD, Sonar, 3D, Celestial, Bloom and Sharpen are +pressed toggles with `active` as their pressed class; Detection sets its own +`active` and `panoptic` classes, and Clean UI is not a pressed toggle (its +owner marks it `active`). The panel's Scope, Celestial, +sky, application-row and Reset glyphs are `UiIcon`s with `:size="null"`, so +the panel's rules still size them (`src/ui/kit/visualControls.test.mjs` pins +it). The toggles' other glyphs (◎ ▣ ✈ □ ✨ 🔍) and the presets' style glyphs +are text characters, not Material symbols, and stay plain spans. `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..c4c9e5ce3f 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/visualControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/src/ui/displayPanel.test.mjs b/src/ui/displayPanel.test.mjs index 2928b10487..045d8e9504 100644 --- a/src/ui/displayPanel.test.mjs +++ b/src/ui/displayPanel.test.mjs @@ -72,7 +72,11 @@ function settings(store) { test('before VisualSettings renders, the panel shows its initial markup', (t) => { const { $ } = fixture(t); - assert.equal($('bloom-toggle').className, 'pp-toggle-btn'); + // Beside the kit's ui-* classes, the toggle carries only its own. + assert.deepEqual( + [...$('bloom-toggle').classList].filter((name) => !name.startsWith('ui-')), + ['pp-toggle-btn'], + ); assert.equal($('bloom-slider-row').className, 'pp-slider-row'); assert.equal($('bloom-intensity-slider').value, '0'); assert.equal($('bloom-intensity-value').textContent, '0%'); diff --git a/src/ui/kit/visualControls.test.mjs b/src/ui/kit/visualControls.test.mjs new file mode 100644 index 0000000000..026639fc87 --- /dev/null +++ b/src/ui/kit/visualControls.test.mjs @@ -0,0 +1,53 @@ +// The Visual panel's buttons and Material glyphs are the kit's: neither its +// template nor the presets it renders hand-writes a +
{{ t('Layout') }} @@ -184,7 +185,7 @@ const allocationOptions = computed(() => [
- + {{ t('Scope') }}
@@ -198,21 +199,21 @@ const allocationOptions = computed(() => [ {{ pct(scopeOpacity) }}
- +

{{ t('Effects') }}

- + {{ t('Celestial') }}
- + {{ row.label }}
@@ -225,7 +226,7 @@ const allocationOptions = computed(() => [
- +
{{ pct(view?.bloom.intensity ?? 0) }}
- +
{{ pct(view?.sharpen.intensity ?? 49) }}
- + + {{ t('Reset to default') }} +
From b3832597528e66443621420bb5a9a4cf3f8fc3b2 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 03:54:11 -0800 Subject: [PATCH 2/2] Add the changelog entry for #1849 Co-authored-by: Manjunath Paparaju --- changelog.d/1849-kit-sweep-display.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelog.d/1849-kit-sweep-display.md diff --git a/changelog.d/1849-kit-sweep-display.md b/changelog.d/1849-kit-sweep-display.md new file mode 100644 index 0000000000..cabf38e8d2 --- /dev/null +++ b/changelog.d/1849-kit-sweep-display.md @@ -0,0 +1,2 @@ +- The Visual panel's buttons and glyphs are now kit controls, with the same + look and behaviour (manjunath22466, samehkhamis, #1849).