mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
Remove the Cyber HUD layout and keep its sonar as a visual style
Display > HUD > Sonar now turns the sonar sweep on over Tactical or Minimal. It is off by default, ON reveals its five sliders, and it keeps its guards: an OFF control, the sweep only while the HUD is visible and outside Cockpit, no animation under reduced motion, and repaint timers re-armed only after a drawn frame that still shows contacts. The Cyber layout, its shell skin and its Cockpit lanes are removed. Share links, scenes, saved views and set_hud that name Cyber open Tactical with Sonar on; links and scene shots record Tactical with Sonar under the same code, and a restored state that names another layout turns Sonar off. set_cyber_sonar keeps its name and works under any layout. A newer Sonar toggle or voice setting wins over a share-link restore that lands later. From 1200px wide the command dock and World Timeline sit 74px above the bottom edge, as in the Omnibar layout, leaving the bottom row to the map attribution (left) and the Power Up corner row (right). The attribution moves to the bottom right when the page runs right to left, where the corner row sits at the bottom left, and a long credit line wraps upward before reaching the corner row. The Tactical bottom-right readout sits 8px above Power Up and the coordinates start level with it. The World Timeline is narrowed to sit between the corners. Toasts keep clear of the raised dock and the chat and voice panel height budgets subtract its rise. Below 1200px the layout is unchanged. The left rail treats the centered World Timeline and voice control as obstacles only where they reach a laid-out panel. On top of the Omnibar: sonar.css replaces cyber.css after the Omnibar imports, the Omnibar's HUD guide step now says Layout picks Tactical or Minimal, and the Omnibar's Tactical bottom-right readout keeps the same 8px above Power Up. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
35b87c75f2
commit
d68adcea21
112 files changed
+1433
-5239
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import { readStylesheet } from '../testSupport/readStylesheet.mjs';
|
||||
import { displayPanelScroller } from './displayPanelScroll.js';
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
@@ -9,21 +8,9 @@ import {
|
||||
} from './panelRails.js';
|
||||
import { applyPanelState, readPanelState } from './rail/panelState.js';
|
||||
|
||||
test('Display uses an inner scroll body only in Cyber', () => {
|
||||
const body = { scrollTop: 95 };
|
||||
const panel = {
|
||||
ownerDocument: { documentElement: { dataset: { uiTheme: 'cyber' } } },
|
||||
querySelector: () => body,
|
||||
};
|
||||
assert.equal(displayPanelScroller(panel), body);
|
||||
panel.ownerDocument.documentElement.dataset.uiTheme = 'tactical';
|
||||
assert.equal(displayPanelScroller(panel), panel);
|
||||
assert.equal(displayPanelScroller(null), null);
|
||||
});
|
||||
|
||||
for (const side of ['left', 'right']) {
|
||||
test(`${side} desktop rail keeps one expanded owner in every HUD layout`, () => {
|
||||
for (const variant of ['tactical', 'minimal', 'cyber']) {
|
||||
for (const variant of ['tactical', 'minimal']) {
|
||||
const f = fixture(side, { hud: { visible: true, variant } });
|
||||
f.expand(f.first, 250);
|
||||
f.expand(f.second, 250);
|
||||
@@ -232,7 +219,7 @@ test('left corridor respects a lower obstacle but ignores an obstacle hidden by
|
||||
assert.equal(Number(f.stack.dataset.safeBottomPct), 65.47);
|
||||
});
|
||||
|
||||
test('a centered timeline only shortens the corridor when it reaches the visible panel', () => {
|
||||
test('a centered timeline only shortens the corridor when it reaches a laid-out panel', () => {
|
||||
const f = fixture('left');
|
||||
f.stack.rect.width = 360;
|
||||
f.stack.rect.right = f.stack.rect.left + 360;
|
||||
@@ -245,6 +232,11 @@ test('a centered timeline only shortens the corridor when it reaches the visible
|
||||
f.run();
|
||||
assert(clear > 85);
|
||||
assert(Number(f.stack.dataset.safeBottomPct) < 73);
|
||||
// Any other obstacle in the same gutter still bounds the corridor.
|
||||
const blocker = element('blocker', { top: 650, left: 320 });
|
||||
f.options.obstacles = [blocker];
|
||||
f.run();
|
||||
assert(Number(f.stack.dataset.safeBottomPct) < 73);
|
||||
});
|
||||
|
||||
test('Data Layers extends to the HUD even if its list is currently short', () => {
|
||||
@@ -413,12 +405,6 @@ test('left rail buttons hold still whether the open panel is short or tall', ()
|
||||
assert.equal(f.stack.dataset.layoutMode, 'focus');
|
||||
assert.notEqual(short.stack.dataset.layoutMode, 'focus');
|
||||
assert.ok(Math.abs(railTop(f.stack) - railTop(short.stack)) < 0.2);
|
||||
|
||||
// A theme that pins the stack's top (Cyber) leaves nothing to offset.
|
||||
f.stack.computed.getPropertyValue = (name) =>
|
||||
name === '--panel-stack-top-pinned' ? ' 1' : '';
|
||||
f.run();
|
||||
assert.equal(f.stack.style.getPropertyValue('--panel-rail-offset'), '0.0px');
|
||||
});
|
||||
|
||||
// The left rail's `top` animates after the right pass runs, and nothing
|
||||
@@ -459,9 +445,9 @@ test('right rail falls back to the committed left target when the transition end
|
||||
});
|
||||
|
||||
test('right rail follows a settled left rail whose CSS overrides the committed target', () => {
|
||||
// Cyber pins the left rail with `top: ... !important`, so the committed
|
||||
// A stylesheet that pins the left rail's `top` means the committed
|
||||
// percentage is not where it renders and no `top` transition runs.
|
||||
const f = fixture('right', { hud: { visible: true, variant: 'cyber' } });
|
||||
const f = fixture('right', { hud: { visible: true, variant: 'minimal' } });
|
||||
f.options.leftStack.rect.top = 220;
|
||||
f.options.leftStack.dataset.safeTopPct = '26.00';
|
||||
f.options.leftStack.getAnimations = () => [];
|
||||
|
||||
Reference in new issue
Block a user