mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 02:02:21 +00:00
Vue kit: Bhote Koshi's buttons and media cards are kit controls and a view
The reconstruction panel's buttons (previous and next beat, Play, Play scene, Cinematic, Full story, Open original, Lower gorge, the field reports and Open public map) are ghost UiButtons that keep their data-action hooks. Cinematic is a pressed toggle: the event layer now presents its state as the record's `pressed` instead of writing an aria-pressed attribute, so it is no longer an exception in viewControls.test.mjs; bhote-koshi.css still reads aria-pressed, so it takes no pressed class. The embedded media cards (frame, leader line, title, status, original link) and the hidden YouTube preload are drawn by BhoteKoshiMediaCards, which bhoteKoshiEmbeddedMedia.js renders into its overlay root with h() and render() on every change and on a locale change, in place of the markup it built with createElement and innerHTML. Placement after each frame, provider loading, preloads, timers and teardown are unchanged. The script still builds the SDK script and preconnect tags, the overlay root and the Facebook player node, which is warmed hidden before its card exists and carried loaded into the card, where the SDK replaces it. bhoteKoshiControls.test.mjs pins it; the media tests run on a DOM. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
bcc25be07a
commit
545beaee87
12 files changed
+614
-269
No files matched your search
@@ -38,7 +38,7 @@ function presentation(patch = {}) {
|
||||
playSceneButton: record({ textContent: '▶ PLAY SCENE', hidden: true }),
|
||||
cinematicButton: record({
|
||||
textContent: '◉ CINEMATIC',
|
||||
attributes: { 'aria-pressed': 'false' },
|
||||
pressed: false,
|
||||
}),
|
||||
storyReplayButton: record({ textContent: '↺ FULL STORY' }),
|
||||
corridorButton: record(),
|
||||
@@ -156,6 +156,10 @@ test('a later presentation updates the controls in place', async (t) => {
|
||||
disabled: true,
|
||||
attributes: { 'aria-label': 'Play Global context' },
|
||||
});
|
||||
next.refs.cinematicButton = record({
|
||||
textContent: '■ RELEASE CAMERA',
|
||||
pressed: true,
|
||||
});
|
||||
next.refs.progressInput = record({ value: '250', hidden: true });
|
||||
next.refs.imagerySection = record({ hidden: true });
|
||||
store.publish(next);
|
||||
@@ -164,6 +168,9 @@ test('a later presentation updates the controls in place', async (t) => {
|
||||
assert.equal(play.textContent, '▶ PLAY SHOT');
|
||||
assert.equal(play.disabled, true);
|
||||
assert.equal(play.getAttribute('aria-label'), 'Play Global context');
|
||||
const cinematic = $('[data-action="cinematic"]');
|
||||
assert.equal(cinematic.getAttribute('aria-pressed'), 'true');
|
||||
assert.equal(cinematic.textContent, '■ RELEASE CAMERA');
|
||||
assert.ok(
|
||||
$('#bhote-koshi-event-panel').classList.contains('bhote-event-scene-beat'),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user