mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
feat(ui): open Display on a first desktop visit to the tabbed rail
With every panel closed nothing shows that the sideways labels are launchers, so Display starts expanded for a first-time visitor on a desktop viewport; phones keep it collapsed and a share link decides for itself. A stored choice still wins. When the rail picks its one owner, a panel the visitor or a share link opened outranks one open only by default, so a stored CCTV choice is not displaced by the Display default. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
575ff3678f
commit
f383174f3e
6 files changed
+72
-23
No files matched your search
@@ -981,19 +981,21 @@ test('the launcher keeps focus, restores it, and never disables the focused butt
|
||||
assert.match(keyboard, /addEventListener\('keydown', onKeyDown, true\)/);
|
||||
});
|
||||
|
||||
test('the DISPLAY rail starts collapsed on a first run, and a stored choice wins', () => {
|
||||
test('the DISPLAY rail starts open on a first desktop run, and a stored choice wins', () => {
|
||||
const ui = fs.readFileSync(
|
||||
new URL('./ui/panelPositionControls.js', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
// The rail opened by default to advertise HUD / DETECT / 3D. Those default ON
|
||||
// now, so it was opening to offer controls for things already happening —
|
||||
// while competing with the mission card for the one first impression there is.
|
||||
// The right rail is a strip of label tabs: with every panel closed nothing
|
||||
// shows that the labels are launchers, so DISPLAY opens on a first desktop
|
||||
// run to demonstrate the strip. Phones keep their sheets and a share link
|
||||
// decides for itself.
|
||||
assert.match(
|
||||
ui,
|
||||
/if \(panelId === 'pp-toggles' && stored === null\) collapsed = true;/,
|
||||
'first run must leave DISPLAY collapsed',
|
||||
/if \(panelId === 'pp-toggles' && stored === null\)\s+collapsed = !allowStored \|\| isPhoneViewport\(\);/,
|
||||
'first desktop run must open DISPLAY; phones and share links keep it closed',
|
||||
);
|
||||
assert.match(ui, /matchMedia\?\.\('\(max-width: 720px\)'\)/);
|
||||
// The first-run default may only apply when NOTHING is stored: a visitor who
|
||||
// opened the rail keeps it open, and one who closed it keeps it closed.
|
||||
const block = ui.slice(
|
||||
|
||||
Reference in new issue
Block a user