feat(ui): render the status chips and their split-flap labels from a store

ShellFeedback publishes the loading status and the road network chip, and
CctvControls the camera grid chip, to the gev-status store; the scene
chrome renders them. SplitFlapText plays the departure-board cascade that
splitFlap.js plans, writing only the label's one text node, and rests when
its owner is destroyed. setSplitFlapText and disposeSplitFlap are gone.
This commit is contained in:
Sameh Khamis committed 2026-10-31 19:51:39 -07:00
1 parent 492b719f19
commit 3c391482f6
21 files changed
+838 -428

No files matched your search

+4 -1
View File
@@ -1127,5 +1127,8 @@
"build/vueLoader.js",
"build/registerVue.js",
"src/ui/panelNavigation.test.mjs",
"src/ui/stores/panels.test.mjs"
"src/ui/stores/panels.test.mjs",
"src/ui/stores/status.js",
"src/ui/statusChipsView.test.mjs",
"src/ui/statusChipOwners.test.mjs"
]
+10 -5
View File
@@ -94,7 +94,10 @@
"src/ui/rail/statusText.js",
"src/voice/control.js",
"src/ui/views/panels/ImagerySplitView.vue",
"src/ui/stores/imagerySplit.js"
"src/ui/stores/imagerySplit.js",
"src/ui/stores/status.js",
"src/ui/views/panels/SplitFlapText.vue",
"src/splitFlap.js"
],
"external": ["vue", "pinia"]
},
@@ -702,7 +705,8 @@
"src/i18n/locales/zh-Hant.json",
"src/ui/unitLabels.js",
"src/ui/vueRuntime.js",
"src/ui/stores/cctv.js"
"src/ui/stores/cctv.js",
"src/ui/stores/status.js"
],
"external": ["vue", "pinia"]
},
@@ -847,7 +851,6 @@
"src/navigationPolicy.js",
"src/panelStackLayout.js",
"src/rightRailPolicy.js",
"src/splitFlap.js",
"src/styles/anime.js",
"src/styles/noir.js",
"src/styles/retro.js",
@@ -1012,7 +1015,8 @@
"src/ui/stores/sceneSharing.js",
"src/ui/stores/voice.js",
"src/ui/stores/location.js",
"src/ui/stores/display.js"
"src/ui/stores/display.js",
"src/ui/stores/status.js"
],
"external": ["cesium", "vue", "pinia"]
},
@@ -2995,7 +2999,8 @@
"src/ui/stores/voice.js",
"src/ui/stores/location.js",
"src/ui/stores/display.js",
"src/ui/stores/imagerySplit.js"
"src/ui/stores/imagerySplit.js",
"src/ui/stores/status.js"
],
"external": [
"hls.js",
+12 -3
View File
@@ -118,10 +118,18 @@ try {
if (type === 'resize' && callback === resizeHandler) counts.resize++;
return removeEventListener.call(this, type, callback, options);
};
const { setSplitFlapText } = await import('/src/splitFlap.js');
// Through the owner, so its copy of the label and the store agree.
const feedbackLabel = document.getElementById('global-loading-label');
setSplitFlapText(feedbackLabel, 'CHECKING LIVE DATA');
setSplitFlapText(feedbackLabel, 'LOAD COMPLETE');
for (const label of ['CHECKING LIVE DATA', 'LOAD COMPLETE']) {
ui._feedback._publishLoading({
hidden: false,
state: 'loading',
label,
detail: '',
});
// Vue renders on a microtask; a task later the label shows it.
await new Promise((resolve) => setTimeout(resolve));
}
const permanentText =
feedbackLabel.querySelector('.gev-flap-text')?.firstChild;
let stateNotifications = 0;
@@ -202,6 +210,7 @@ try {
feedbackLabel.querySelector('.gev-flap-text')?.firstChild ===
permanentText &&
permanentText.data === 'LOAD COMPLETE' &&
document.getElementById('global-loading-status').hidden &&
!feedbackLabel.classList.contains('gev-flap-active') &&
feedbackLabel.querySelector('.gev-flap-cells')?.childNodes.length ===
0,