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). diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index b8b9c02134..cf0678a1fa 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -83,9 +83,11 @@ 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. @@ -105,6 +107,16 @@ ghost `UiButton`s, and its search, row and chip glyphs are `UiIcon`s with row's glyphs stay inline SVG, since no Material symbol the page loads draws them, and its field is its own combobox rather than a `UiSearchField`. +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 eec578f410..d1e829041d 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/kit/welcomeControls.test.mjs", "src/ui/kit/omnibarControls.test.mjs", "src/ui/styles/chip.css", 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') }} +