From ca504fa8f68e9ed311e624499436bb760f6a00ea Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 03:19:03 -0800 Subject: [PATCH] Vue kit: the Layer Finder's buttons are UiButtons and its glyphs UiIcons Search, Filter, the filter menu's Status and Category options and the bar's two clear chips are ghost UiButtons. Search and the options are pressed toggles in place of hand-written aria-pressed; the options take active as their pressed class, while Search keeps its own active binding, which also stays on while a query is typed. Escape in the menu still gives focus back to the Filter button, now through the UiButton's root. Every Material glyph in it is a UiIcon sized by layer-finder.css. A guard test pins it, and the migration notes say so. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 9 +++++ scripts/format-scope.json | 1 + src/ui/kit/layerFinderControls.test.mjs | 50 +++++++++++++++++++++++++ src/ui/views/panels/LayerFinder.vue | 41 ++++++++++---------- 4 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 src/ui/kit/layerFinderControls.test.mjs diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index 7b20c82fe5..5b16a0b61f 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -89,6 +89,15 @@ tilt-map button, whose owners still 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 Layer Finder's buttons (Search, Filter, the filter menu's Status and +Category options and the bar's two clear chips) are ghost `UiButton`s. +Search and the options are pressed toggles; the options' pressed class is +`active`, while Search keeps its own `active` binding, which also stays on +while a query is typed. The Filter button opens a disclosure and carries +`aria-expanded`, not `aria-pressed`. Every glyph its own template draws is +a `UiIcon` with `:size="null"`, so `layer-finder.css` still sizes them +(`src/ui/kit/layerFinderControls.test.mjs` pins it); the search field's +magnifier is `UiSearchField`'s own span. `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 336b0ad4b2..dbb9284655 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/layerFinderControls.test.mjs", "src/ui/styles/chip.css", "src/ui/styles/empty-state.css", "src/ui/rail/RailChips.vue", diff --git a/src/ui/kit/layerFinderControls.test.mjs b/src/ui/kit/layerFinderControls.test.mjs new file mode 100644 index 0000000000..66e603880b --- /dev/null +++ b/src/ui/kit/layerFinderControls.test.mjs @@ -0,0 +1,50 @@ +// The Layer Finder's buttons and Material glyphs are the kit's: its template +// hand-writes no