feat(ui): render the Context mode switch from a store

ContextControls presents the selected mode, the transition busy state and the nearby sites search through a publish option, and ContextView renders them from the gev-context store. ./ui/context stays free of Vue. The Radio QA reads the search button's aria-busy, the state it actually carries.
This commit is contained in:
Sameh Khamis committed 2026-10-31 00:51:29 -07:00
1 parent b6c7c130f6
commit 749bfd5cd4
13 files changed
+273 -143

No files matched your search

+15 -3
View File
@@ -1,5 +1,8 @@
import { _initGlobalContextPanel } from './contextBindings.js';
import { _syncContextModeButtons } from './contextPresentation.js';
import {
_syncContextModeButtons,
_presentContext,
} from './contextPresentation.js';
import {
_trackContextLayerReaction,
_waitForContextLayerSettlement,
@@ -22,12 +25,18 @@ import {
} from './contextActions.js';
import { connectContextManager } from './contextSubscriptions.js';
/** Own Context transactions and controls through explicit layer and presentation ports. */
/**
* Own Context transactions and controls through explicit layer and
* presentation ports. The mode switch is presented through `publish`
* (the app hands it the `gev-context` store) and rendered by the view.
*/
export class ContextControls {
constructor({ elements, installations, actions }) {
constructor({ elements, installations, actions, publish = () => {} }) {
Object.assign(this, elements);
this.installations = installations;
this.actions = actions;
this.publish = publish;
this._installationsSearchBusy = false;
this.listeners = new AbortController();
this.destroyed = false;
this._dataManager = null;
@@ -93,6 +102,9 @@ export class ContextControls {
_syncContextModeButtons(...args) {
return _syncContextModeButtons.call(this, ...args);
}
_presentContext(...args) {
return _presentContext.call(this, ...args);
}
_trackContextLayerReaction(...args) {
return _trackContextLayerReaction.call(this, ...args);
}