mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
fix(cockpit): scope the centred phone row and keep Stories unread in Cockpit
The centred Display/Radio row now applies only inside the phone shell (720 px and below) on flight and bridge views; satellite and provider cockpits, narrow short windows (under 390x450) and very short windows (under 240 px) keep main's right-anchored place, so the row no longer lands on the desktop rail, orbital zoom, LOOK AHEAD, Reset or the Stories button. The row sizes to its launchers instead of spanning the width. The first-visit Stories announcement stays hidden and unread while Cockpit is open: a Stories tap that Cockpit refuses no longer marks it seen, so it shows again after Exit. The unit tests and the Cockpit QA cover the phone boundary, glyph and side taps, the destination cue, short and narrow windows and the announcement's return.
This commit is contained in:
1 parent
0c828095ad
commit
49785e423d
7 files changed
+204
-69
No files matched your search
@@ -1142,14 +1142,16 @@ test('mobile Cockpit prioritizes flight instruments and collision-safe controls'
|
||||
assert.match(mobileCockpit[1], /body\.cockpit-mode \.cockpit-signal-window/);
|
||||
assert.match(
|
||||
mobileCockpit[1],
|
||||
/body\.cockpit-mode \.cockpit-utility-controls \{[^}]*?top:\s*clamp\(\s*72px,\s*calc\(46% - 68px\),\s*calc\(var\(--cockpit-visor-top\) \+ 108px\)\s*\);[^}]*?left:\s*12px;[^}]*?justify-content:\s*center;[^}]*?pointer-events:\s*none;/,
|
||||
/body\.cockpit-mode \.cockpit-utility-controls[\s\S]*?bottom:\s*152px;/,
|
||||
);
|
||||
assert.match(
|
||||
mobileCockpit[1],
|
||||
/body\.cockpit-mode \.cockpit-utility-control \{\s*pointer-events:\s*auto;\s*\}/,
|
||||
/body\.cockpit-mode\.mobile-shell[^{]*?\.cockpit-utility-controls \{[^}]*?top:[^;]*?var\(--cockpit-visor-top\)/,
|
||||
);
|
||||
assert.match(
|
||||
mobileCockpit[1],
|
||||
/@media \(min-width: 390px\) and \(min-height: 240px\),\s*\(min-height: 450px\) \{\s*body\.cockpit-mode\.mobile-shell/,
|
||||
);
|
||||
assert.doesNotMatch(mobileCockpit[1], /bottom:\s*152px;/);
|
||||
assert.match(css, /--cockpit-visor-top:\s*clamp\(62px, 9vh, 90px\);/);
|
||||
assert.match(css, /\.cockpit-visor-shell \{[^}]*?inset:\s*var\(--cockpit-visor-top\)/);
|
||||
assert.match(
|
||||
mobileCockpit[1],
|
||||
@@ -1169,6 +1171,15 @@ test('mobile Cockpit prioritizes flight instruments and collision-safe controls'
|
||||
);
|
||||
});
|
||||
|
||||
test('the unread Stories announcement waits until Cockpit closes', () => {
|
||||
assert.match(css, /body\.cockpit-mode #gev-stories #hPop \{\s*display:\s*none;\s*\}/);
|
||||
const storiesView = fs.readFileSync(path.join(ROOT, 'src', 'ui', 'views', 'StoriesView.vue'), 'utf8');
|
||||
assert.match(
|
||||
storiesView,
|
||||
/async function openExplore\(\) \{[^}]*?if \(await store\.controller\.open\(\)\) markPopSeen\(\);/,
|
||||
);
|
||||
});
|
||||
|
||||
test('cockpit route direction uses self-contained vector artwork, not a font ligature', () => {
|
||||
const match = html.match(/<div id="cockpit-route-direction"[\s\S]*?<\/div>/);
|
||||
assert.ok(match, 'cockpit route-direction markup is missing');
|
||||
|
||||
Reference in new issue
Block a user