From 1e70e15ceb6dabce43972964863fa3bfe3c3b647 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Thu, 19 Nov 2026 07:48:51 -0800 Subject: [PATCH] Vue kit: the docs' every-control claims hold, and a scan of every view pins them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docs/VUE-MIGRATION.md says every select is a UiSelect, every close button a UiCloseButton and (nearly) every pressed toggle a UiButton. Make those true in code, correct the sentences that were not, and pin them. Selects: Story Explore's sort, the chat's layer picker and a layer row's range ends are UiSelects. The range ends take `hold`, since the layer panel repaints the row on a later frame. Close buttons: the space mission replay's Cancel is a bare UiCloseButton. An imported file's row actions (show or hide, fly to, remove) are icon UiButtons drawing the icon the file import names, so Remove stays one of them; the presenter's `pressed` is now a boolean. Pressed toggles: the tilt-map button, the scene action buttons, the chat and voice panels' dock (and its minimize), the Context header's search and expand, Recent Imagery's day chips, SWAP and ZOOM IN, the rail row lists and the rail cards' action chips are UiButtons with `pressed` (and `pressed-class="active"` where their active class came from the same state). Their Material glyphs, and the rail chips' icons, are UiIcons with `:size="null"`. Bhote Koshi's cinematic button keeps the attributes its layer writes, and Explore's story cards stay role="button" elements. Docs: the kit list gains UiPanelToggle and UiPanelEdge; the pressed-toggle, chips, Stories search fields, role="dialog", close button, range and source-reading-tests sentences now say what the code does. Tests: src/ui/kit/viewControls.test.mjs walks every .vue outside the kit and fails on a raw select, a hand-written aria-pressed on a button, UiButton or role="button" element (outside the two documented exceptions), or a hand-written close glyph button. closeButtons.test.mjs also catches a × inside a span. Co-authored-by: Manjunath Paparaju --- docs/VUE-MIGRATION.md | 92 +++++---- scripts/format-scope.json | 2 + src/ui/displayPanel.test.mjs | 2 +- src/ui/geoFileImport.js | 2 +- src/ui/geoFileImport.test.mjs | 2 +- src/ui/kit/closeButtons.test.mjs | 12 +- src/ui/kit/dialogs.test.mjs | 5 +- src/ui/kit/storiesControls.test.mjs | 11 +- src/ui/kit/viewControls.test.mjs | 174 ++++++++++++++++++ src/ui/layerPanel/RowRange.vue | 14 +- src/ui/layerPanel/layerRows.test.mjs | 2 +- src/ui/layerPanel/rowRange.test.mjs | 51 +++++ src/ui/rail/RailCardBlocks.vue | 18 +- src/ui/rail/RailChips.vue | 11 +- src/ui/rail/RailRowList.vue | 11 +- src/ui/recentImagery/RecentImageryCard.vue | 16 +- src/ui/recentImagery/RecentImageryReadout.vue | 19 +- src/ui/views/ContextView.vue | 13 +- src/ui/views/panels/ChatPanel.vue | 7 +- src/ui/views/panels/GeoImport.vue | 10 +- src/ui/views/panels/GlobeActions.vue | 8 +- src/ui/views/panels/MissionDetail.vue | 2 +- src/ui/views/panels/PanelLayoutButtons.vue | 5 +- src/ui/views/panels/SceneInteractions.vue | 3 +- src/ui/views/stories/ExploreScreen.vue | 5 +- 25 files changed, 381 insertions(+), 116 deletions(-) create mode 100644 src/ui/kit/viewControls.test.mjs create mode 100644 src/ui/layerPanel/rowRange.test.mjs diff --git a/docs/VUE-MIGRATION.md b/docs/VUE-MIGRATION.md index cd8c9078c9..d82f798808 100644 --- a/docs/VUE-MIGRATION.md +++ b/docs/VUE-MIGRATION.md @@ -37,9 +37,12 @@ one-panel rule too. Share links continue to record which panels are open. ## Component kit `src/ui/kit/` holds the generic components: `UiRail`, `UiTooltip`, `UiIcon`, -`UiButton`, `UiCloseButton`, `UiPanel`, `UiSegmented`, `UiSlider`, `UiChip`, -`UiSelect`, `UiSearchField`, `UiCheckbox`, `UiDialog`, `UiBadge` and `UiEmpty` so far, with more -joining as the controls they serve are converted. One component +`UiButton`, `UiCloseButton`, `UiPanel`, `UiPanelToggle` (a panel's collapse +button, which `UiPanel` and `PanelCollapseButton` draw), `UiPanelEdge` (a +panel header's edge switch), `UiSegmented`, `UiSlider`, `UiChip`, +`UiSelect`, `UiSearchField`, `UiCheckbox`, `UiDialog`, `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 are styled by the existing stylesheet and custom properties, and they contain @@ -83,14 +86,20 @@ 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. Not every pressed toggle in -the views is one yet: the context view 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. +code adds (a voice highlight) survives a press. Every pressed toggle (a +control with `aria-pressed`) in the views is a `UiButton` with `pressed` +except two that keep their own `aria-pressed`: Bhote Koshi's cinematic +button, whose state the event layer writes into the attributes its panel +renders, and Explore's story cards, which are `role="button"` elements, +not buttons (`src/ui/kit/viewControls.test.mjs` pins it). Where the +converted buttons draw Material symbols (the tilt-map button, the Context +header's search and expand, the imported files' row actions and the rail +chips' icons), the glyphs are `UiIcon`s with `:size="null"`, so the site +rules still size them. Core's pressable chips and pills (the rail cards' +chips and action chips, Recent Imagery's day chips, SWAP and ZOOM IN, map +sources, cities and places) are `UiButton`s too; the view context's place +and layer chips and the key setup chip are still plain buttons. `UiChip` +is a non-interactive label chip, used by the voice card. The welcome card's buttons (SKIP, the three start tiles, BROWSE STORIES, BACK and the main NEXT / ENTER GOD MODE action) are ghost `UiButton`s: the start tiles are pressed toggles, and all but SKIP keep `aria-disabled` @@ -106,11 +115,13 @@ Story screen's Context button and the timeline's Expand map are pressed toggles, with no pressed class since their skins read `aria-pressed`; Explore's story cards are `role="button"` elements and keep their own `aria-pressed`. Their glyphs are inline SVG drawn for Stories, which no -Material symbol the page loads draws the same, so they stay SVG; the two -search fields keep their own markup, since `UiSearchField`'s Material -magnifier would replace their SVG one, and their clear buttons, which draw -an SVG cross, are ghost `UiButton`s rather than `UiCloseButton`s -(`src/ui/kit/storiesControls.test.mjs` pins it). +Material symbol the page loads draws the same, so they stay SVG; the three +search fields (Explore's two and the Story context sheet's story search, a +combobox) keep their own markup, since `UiSearchField`'s Material +magnifier would replace their SVG one, and Explore's two clear buttons, +which draw an SVG cross, are ghost `UiButton`s rather than +`UiCloseButton`s (`src/ui/kit/storiesControls.test.mjs` pins it). +Explore's sort is a `UiSelect`. The Omnibar's mic (a pressed toggle with `active`) and its suggestion strip's chips (options, so `aria-current` rather than `pressed`) are ghost `UiButton`s, and its search, row and chip glyphs are `UiIcon`s with @@ -153,7 +164,12 @@ options that carry their own attributes come through the slot, a caller's `@change` still reaches the select, and `hold` works as in `UiSlider`. Without `hold`, a select takes its model back after its own change renders, so a pick its owner refuses goes back; an owner that answers later (the SDR -gain) takes `hold`. Every select in the views is a `UiSelect`. +gain) takes `hold`. A layer row's range ends are repainted on a later frame +and may come back reordered (a start picked after the end swaps them), so +they take a plain `value` instead of a model: a pick stays until the owner +publishes a different value, which shows at once, focused or not +(`src/ui/layerPanel/rowRange.test.mjs`). Every select in the views is a +`UiSelect` (`src/ui/kit/viewControls.test.mjs` pins it). `UiBadge` takes a `tone` and carries Core's `gev-status-badge`; its density variants and colours stay caller classes, and it renders the CCTV source and calibration badges and the rail card badges. `UiEmpty` takes @@ -165,13 +181,16 @@ empty rows stay a paragraph and table cells. no tip unless the site passes a `title`; attributes and classes pass through, so each site keeps its id, feature class and look. Every close, dismiss and clear button in the views that draws a cross is one -(`src/ui/kit/closeButtons.test.mjs` pins it) except Story Explore's two -search clears, whose SVG cross is neither of its glyphs; the Story context +(`src/ui/kit/closeButtons.test.mjs` and `viewControls.test.mjs` pin it, +for a bare × or one in a span) except Story Explore's two search clears, +whose SVG cross is neither of its glyphs, and an imported file's +Remove, one of the row's icon `UiButton`s (show or hide, fly to, remove) +that draw the icon the file import names for each. The Story context sheet's Close is a text button, a plain `UiButton`. Street Level's and the -space mission's keep `bare`, since their skins set their own padding and -border, and so does the credits list's. The -Quebec CCTV overlay's close is one too, and so is the Omnibar guide's, -which keeps its feature class and tip. +space mission's (its deselect and the replay's Cancel) keep `bare`, since +their skins set their own padding and border, and so does the credits +list's. The Quebec CCTV overlay's close is one too, and so is the Omnibar +guide's, which keeps its feature class and tip. `UiSearchField` takes `v-model`, a required `label` (the input's accessible name), `placeholder` and `tag` (`div`, given `role="search"` by the site, or `label`); attributes and classes go to the frame, and @@ -215,7 +234,8 @@ classes, styles and listeners go to the dialog, and `element` is exposed. The Data Library and the scene sharing dialogs are `UiDialog`s (`src/ui/kit/dialogs.test.mjs` pins it); the panels drawn as `role="dialog"` (key setup, the welcome launcher, the CCTV popup, Story -Explore's filter, the credits) and the render failure's `alertdialog` are +Explore's filter, the credits, the Omnibar guide's callout) and the render +failure's `alertdialog` are other controls. The two dialogs share no declarations, so it has no kit rules. `UiSlider` keeps the native range input rather than drawing a @@ -227,9 +247,12 @@ are, without Core's slider surface). A caller's own input, change and blur handlers still reach the input, and a null model leaves it as it is. It is a functional render-function component, so the portable `./ui/input` rows use it without a component compiler. Every range in the views is a -`UiSlider` except the radio tuner's: its owner moves the handle back to the +`UiSlider` except two. The radio tuner's owner moves the handle back to the selected station on a drag's first input without changing the slot, which -a functional component would not render again. +a functional component would not render again. The world timeline's +scrubber is a bare range inside its own gesture track: its `step="any"` +bounds follow the zoomed view, and a pinch puts the input back on the +handle itself. Controls share one skin, so every panel reads the same. Every scrolling surface carries the kit's `.ui-scroll`, which draws the thin @@ -500,14 +523,15 @@ once passes the locale itself as a prop or key, as the credits line does. records surface by surface; [Building UI](../CONTRIBUTING.md#building-ui) now requires the pattern for new UI. The page-level markup tests read `renderApplicationHtml()`, the real views rendered on the server, and new - tests mount components; two tests still read a `.vue` file's source - (`panelStorageDocs`, `geoFileImport`). The views translate with `t()` - while rendering, and vue-i18n holds the locale they read; the attribute - translation pass is left for static page markup (the loading screen and a - host's own markup). An explicit API for hosts to register panels and rail items is - deferred until a host adds one: no host does today (the hosted - application's account interface is its own markup), and the first such - panel, the hosted timeline, will shape it. + tests mount components. Many tests still read `.vue` sources: the kit's + control scans in `src/ui/kit/` (`viewControls`, `closeButtons`, + `checkboxes`, `dialogs` and the per-surface ones) and markup checks such + as `contextTabKeyboard`, `geoFileImport` and `panelStorageDocs`. The + views translate with `t()` while rendering, and vue-i18n holds the + locale they read; the attribute translation pass is left for static page + markup (the loading screen and a host's own markup). An explicit API for + hosts to register panels and rail items is deferred until a host needs + one. ## Verification diff --git a/scripts/format-scope.json b/scripts/format-scope.json index e86ae6c4ea..ebfa59916f 100644 --- a/scripts/format-scope.json +++ b/scripts/format-scope.json @@ -1332,6 +1332,7 @@ "src/ui/kit/UiCloseButton.vue", "src/ui/kit/UiCloseButton.test.mjs", "src/ui/kit/closeButtons.test.mjs", + "src/ui/kit/viewControls.test.mjs", "src/ui/styles/close-button.css", "src/ui/kit/UiSearchField.vue", "src/ui/kit/UiSearchField.test.mjs", @@ -1424,6 +1425,7 @@ "src/data/firmsIntensity.test.mjs", "src/ui/layerPanel/RowSwitch.vue", "src/ui/layerPanel/RowRange.vue", + "src/ui/layerPanel/rowRange.test.mjs", "src/ui/layerPanel/RowSlider.vue", "src/sources/phaseTiming.test.mjs", "scripts/build-census-places.mjs", diff --git a/src/ui/displayPanel.test.mjs b/src/ui/displayPanel.test.mjs index 045d8e9504..5e61660434 100644 --- a/src/ui/displayPanel.test.mjs +++ b/src/ui/displayPanel.test.mjs @@ -557,7 +557,7 @@ test('the imported files render what the file import publishes and keep focus', assert.equal(name.textContent, 'a.geojson'); assert.equal(name.children.length, 0, 'the name is text'); assert.match(name.title, /GEOJSON, 2 map objects$/); - assert.equal(toggle.className, 'geo-import-action'); + assert.ok(toggle.classList.contains('geo-import-action')); assert.equal(toggle.getAttribute('type'), 'button'); assert.equal(toggle.getAttribute('aria-pressed'), 'true'); assert.equal(toggle.getAttribute('aria-label'), 'Hide a.geojson'); diff --git a/src/ui/geoFileImport.js b/src/ui/geoFileImport.js index 3b55f13ede..e65ab0ae3d 100644 --- a/src/ui/geoFileImport.js +++ b/src/ui/geoFileImport.js @@ -162,7 +162,7 @@ export function initGeoFileImport({ ? t('Hide {name}', { name: item.name }) : t('Show {name}', { name: item.name }), action: 'toggle', - pressed: String(item.visible), + pressed: Boolean(item.visible), }, { icon: 'my_location', diff --git a/src/ui/geoFileImport.test.mjs b/src/ui/geoFileImport.test.mjs index 11c3e4dad3..e65fed015f 100644 --- a/src/ui/geoFileImport.test.mjs +++ b/src/ui/geoFileImport.test.mjs @@ -220,7 +220,7 @@ test('row buttons hide, show, fly to and remove a file', async () => { shapes: [], }); assert.equal(t.tool.list()[0].visible, false); - assert.equal(action(rows(t)[0], 'toggle').pressed, 'false'); + assert.equal(action(rows(t)[0], 'toggle').pressed, false); assert.equal(action(rows(t)[0], 'toggle').icon, 'visibility_off'); assert.equal(action(rows(t)[0], 'toggle').label, 'Show a.gpx'); glyphClick('fly'); diff --git a/src/ui/kit/closeButtons.test.mjs b/src/ui/kit/closeButtons.test.mjs index 28428bc1bd..dc56589eef 100644 --- a/src/ui/kit/closeButtons.test.mjs +++ b/src/ui/kit/closeButtons.test.mjs @@ -1,6 +1,7 @@ // Every close, dismiss and clear button in a Vue view is a UiCloseButton: no -// SFC template hand-writes a button whose only content is × or the Material -// `close` symbol. Buttons built in script are not read here. +// SFC template hand-writes a button whose only content is × (bare or in a +// span) or the Material `close` symbol. Buttons built in script are not read +// here. import { test } from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync, readdirSync } from 'node:fs'; @@ -30,8 +31,10 @@ function template(source) { // An opening tag's attributes, quoted values may hold `>` (`() => x`). const ATTRS = String.raw`(?:[^>"']|"[^"]*"|'[^']*')*`; const BUTTON = String.raw`(button|UiButton)`; +const TIMES = String.raw`×|×|×|×`; const CLOSE_GLYPH = [ - String.raw`×|×|×|×`, + TIMES, + String.raw`\s*(?:${TIMES})\s*`, String.raw`]*\bmaterial-symbols-outlined\b[^>]*>\s*close\s*`, String.raw``, ].join('|'); @@ -54,11 +57,14 @@ test('the scan finds each hand-written close glyph', () => { '', '', '', + '', + '', ]) assert.equal(handWrittenCloses(markup).length, 1, markup); for (const markup of [ '', '', + '', '', '', ]) diff --git a/src/ui/kit/dialogs.test.mjs b/src/ui/kit/dialogs.test.mjs index 80a6244947..581112895a 100644 --- a/src/ui/kit/dialogs.test.mjs +++ b/src/ui/kit/dialogs.test.mjs @@ -1,7 +1,8 @@ // Every modal dialog in a Vue view is a UiDialog: no SFC template hand-writes // ``. Panels drawn as `role="dialog"` (key setup, the welcome -// launcher, the CCTV popup, Story Explore's filter) and the render failure's -// `alertdialog` are other controls. +// launcher, the CCTV popup, Story Explore's filter, the credits, the Omnibar +// guide's callout) and the render failure's `alertdialog` are other +// controls. import { test } from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync, readdirSync } from 'node:fs'; diff --git a/src/ui/kit/storiesControls.test.mjs b/src/ui/kit/storiesControls.test.mjs index 4524e5ee80..c526a88434 100644 --- a/src/ui/kit/storiesControls.test.mjs +++ b/src/ui/kit/storiesControls.test.mjs @@ -3,11 +3,12 @@ // ``. Their glyphs are inline SVG drawn for Stories // (play, pause, back, filter, search, clear, expand, the GEV eye); no // Material symbol the page loads draws any of them the same, so they stay -// SVG, and no view hand-writes a Material Symbols span. The two search -// fields keep their own markup rather than UiSearchField, whose Material -// magnifier would replace their SVG one, and their clear buttons stay ghost -// UiButtons with an SVG cross rather than UiCloseButtons, whose glyph is × -// or the Material `close` symbol. +// SVG, and no view hand-writes a Material Symbols span. The three search +// fields (Explore's two and the Story context sheet's) keep their own markup +// rather than UiSearchField, whose Material magnifier would replace their +// SVG one, and Explore's two clear buttons stay ghost UiButtons with an SVG +// cross rather than UiCloseButtons, whose glyph is × or the Material `close` +// symbol. import { test } from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; diff --git a/src/ui/kit/viewControls.test.mjs b/src/ui/kit/viewControls.test.mjs new file mode 100644 index 0000000000..ec2c708dd5 --- /dev/null +++ b/src/ui/kit/viewControls.test.mjs @@ -0,0 +1,174 @@ +// The kit's every-control claims in docs/VUE-MIGRATION.md, read from every +// SFC outside the kit: every select is a UiSelect, every pressed toggle a +// UiButton with `pressed` (no template hand-writes `aria-pressed` on any +// element, as an attribute or inside a `v-bind` object, apart from the +// exceptions below), and every close, dismiss and clear button a +// UiCloseButton. +// Controls built in script are not read here. +import { test } from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync, readdirSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const SRC_ROOT = fileURLToPath(new URL('../../', import.meta.url)); +const KIT_ROOT = fileURLToPath(new URL('./', import.meta.url)); +const REPO_ROOT = path.resolve(SRC_ROOT, '..'); + +// The pressed toggles that still hand-write `aria-pressed`, by file: each +// pattern matches exactly one of the file's tags, and no other tag may. +const HAND_WRITTEN_PRESSED = { + // The cinematic button renders the attributes the Bhote Koshi layer + // writes for it, `aria-pressed` among them. + 'src/ui/views/panels/BhoteKoshiPanel.vue': [/^/g, '') + .replace(//g, ''); +} + +// An opening tag's attributes, quoted values may hold `>` (`() => x`). +const ATTRS = String.raw`(?:[^>"']|"[^"]*"|'[^']*')*`; +const RAW_SELECT = /`, 'g'); +// An attribute's name, outside the quoted values. +const names = (attrs) => attrs.replace(/"[^"]*"|'[^']*'/g, '""'); +const PRESSED = /(?:^|\s)(?::|v-bind:)?aria-pressed(?=[\s=/]|$)/; +// A `v-bind` object that names aria-pressed. +const BOUND_PRESSED = + /(?:^|\s)(?:v-bind|:)=(?:"[^"]*aria-?pressed[^"]*"|'[^']*aria-?pressed[^']*')/i; +const TIMES = String.raw`×|×|×|×`; +const CLOSE_GLYPH = [ + TIMES, + String.raw`\s*(?:${TIMES})\s*`, + String.raw`]*\bmaterial-symbols-outlined\b[^>]*>\s*close\s*`, + String.raw``, +].join('|'); +const HAND_WRITTEN_CLOSE = new RegExp( + String.raw`<(button|UiButton)\b${ATTRS}>\s*(?:${CLOSE_GLYPH})\s*`, + 'gi', +); + +const tidy = (markup) => markup.replace(/\s+/g, ' '); + +/** Raw selects in an SFC's template. */ +const rawSelects = (source) => + [...template(source).matchAll(RAW_SELECT)].map((m) => m[0]); + +/** Tags that hand-write aria-pressed. */ +function handWrittenPressed(source) { + const found = []; + for (const m of template(source).matchAll(ANY_TAG)) + if (PRESSED.test(names(m[1])) || BOUND_PRESSED.test(m[1])) + found.push(tidy(m[0])); + return found; +} + +/** Hand-written close buttons in an SFC's template. */ +const handWrittenCloses = (source) => + [...template(source).matchAll(HAND_WRITTEN_CLOSE)].map((m) => tidy(m[0])); + +const views = sfcFiles().map((file) => ({ + file: path.relative(REPO_ROOT, file).split(path.sep).join('/'), + source: readFileSync(file, 'utf8'), +})); + +test('the scans find each hand-written control', () => { + for (const markup of [ + '', + '', + ]) + assert.equal(rawSelects(markup).length, 1, markup); + for (const markup of [ + '', + '', + '', + ]) + assert.equal(rawSelects(markup).length, 0, markup); + + for (const markup of [ + '', + '', + '', + '', + '', + '', + '', + ]) + assert.equal(handWrittenPressed(markup).length, 1, markup); + for (const markup of [ + '', + '', + '', + ]) + assert.equal(handWrittenPressed(markup).length, 0, markup); + + for (const markup of [ + '', + '', + '', + ]) + assert.equal(handWrittenCloses(markup).length, 1, markup); + for (const markup of [ + '', + '', + ]) + assert.equal(handWrittenCloses(markup).length, 0, markup); +}); + +test('the views are read: the scan reaches the views and skips the kit', () => { + const files = views.map((view) => view.file); + assert.ok(files.includes('src/ui/views/panels/ChatPanel.vue')); + assert.ok(files.includes('src/ui/layerPanel/RowRange.vue')); + assert.ok(!files.some((file) => file.startsWith('src/ui/kit/'))); +}); + +test('every select in the views is a UiSelect', () => { + const found = []; + for (const { file, source } of views) + for (const markup of rawSelects(source)) found.push(`${file}: ${markup}`); + assert.deepEqual(found, []); +}); + +test('no view hand-writes aria-pressed on a button outside the documented exceptions', () => { + const unexpected = []; + for (const { file, source } of views) { + const allowed = [...(HAND_WRITTEN_PRESSED[file] ?? [])]; + for (const markup of handWrittenPressed(source)) { + const at = allowed.findIndex((pattern) => pattern.test(markup)); + if (at === -1) unexpected.push(`${file}: ${markup}`); + else allowed.splice(at, 1); + } + assert.deepEqual(allowed, [], `${file}: an exception no longer matches`); + } + assert.deepEqual(unexpected, []); +}); + +test('no view hand-writes a close button; each is a UiCloseButton', () => { + const found = []; + for (const { file, source } of views) + for (const markup of handWrittenCloses(source)) + found.push(`${file}: ${markup}`); + assert.deepEqual(found, []); +}); diff --git a/src/ui/layerPanel/RowRange.vue b/src/ui/layerPanel/RowRange.vue index 06b8586e11..4fd80703c2 100644 --- a/src/ui/layerPanel/RowRange.vue +++ b/src/ui/layerPanel/RowRange.vue @@ -1,7 +1,13 @@