mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(voice): render the voice control from a presenter
createVoiceControl now returns a presenter instead of building the control with innerHTML: the session, cost, input, card and panel owners write its state by part and listen for interactions, and VoiceControl.vue renders it in the command dock, between the location bar and the visual presets as before. Focus moves wait for the render; the waveform's bars publish apart from the control and only when they change; the minutes field keeps a draft until its owner writes it. Owner tests use a real presenter on their own store, and view tests render the control.
This commit is contained in:
1 parent
2ffd7a4afd
commit
1de4f635ca
47 files changed
+1691
-1645
No files matched your search
@@ -5,6 +5,7 @@
|
||||
// Run with: npm test
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createTestVoiceUi } from '../testSupport/voiceUi.mjs';
|
||||
import {
|
||||
initialVoiceCardState,
|
||||
reduceVoiceCard,
|
||||
@@ -206,14 +207,7 @@ test('the voice controls reset the runner on stop and dispose it on removal', as
|
||||
globalThis.window = {};
|
||||
try {
|
||||
const h = harness();
|
||||
const button = new EventTarget();
|
||||
button.setAttribute = () => {};
|
||||
const ui = {
|
||||
button,
|
||||
root: { dataset: {}, remove() {} },
|
||||
status: {},
|
||||
detail: {},
|
||||
};
|
||||
const ui = createTestVoiceUi();
|
||||
const lifetime = new AbortController();
|
||||
let emitState;
|
||||
const controls = createVoiceCommands({
|
||||
|
||||
Reference in new issue
Block a user