feat(ui): render the map source chips and status badge from the store

createMapSourceControls() (./ui/maps) no longer builds the chip row or
writes the status badge: it presents both and hands them to its publish
option, so the entry stays Vue-free. The shell publishes them to the
gev-display store and connects the controls, and the dock renders the
chips and calls select() for an available one. renderMapStackChips and
syncMapStackChips are deprecated. The map source QA harnesses wait for
the dock to render and no longer read the removed element refs.
This commit is contained in:
Sameh Khamis committed 2026-10-31 12:11:35 -07:00
1 parent decac29fbd
commit 4966877859
13 files changed
+233 -155

No files matched your search

+22 -1
View File
@@ -6,7 +6,8 @@ import { markRaw, shallowRef } from 'vue';
* groups (`_presentDisplay()`), AircraftDisplay the 3D aircraft group, the
* draw tool its controls and the file import its list, and each publishes
* here; each keeps its listeners on the controls. VisualSettings also
* publishes the active style, which the dock and the scene chrome show.
* publishes the active style, which the dock and the scene chrome show, and
* the map source controls publish their chip row beside it.
*/
export const useDisplayStore = defineStore('gev-display', () => {
/** The presented panel; null until VisualSettings first renders. */
@@ -49,6 +50,22 @@ export const useDisplayStore = defineStore('gev-display', () => {
style.value = markRaw(next);
}
/** The map source chips and status; null until the controls first render. */
const mapSource = shallowRef(null);
/** @param {object} next A fresh presentation of the map source row. */
function publishMapSource(next) {
mapSource.value = next && markRaw(next);
}
/** The map source controls whose `select(id)` a chip calls. */
const mapSourceControls = shallowRef(null);
/** @param {?object} controls The map source controls, or null to disconnect. */
function connectMapSource(controls) {
mapSourceControls.value = controls && markRaw(controls);
}
return {
view,
publish,
@@ -60,5 +77,9 @@ export const useDisplayStore = defineStore('gev-display', () => {
publishGeoImport,
style,
publishStyle,
mapSource,
publishMapSource,
mapSourceControls,
connectMapSource,
};
});