mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
Merge branch 'main' into samehkhamis/grounded-military-height
This commit is contained in:
5 files changed
+64
-40
No files matched your search
@@ -0,0 +1,2 @@
|
||||
- On desktop the search dock sits above the World Timeline, which takes the
|
||||
dock's floor (Sameh Khamis, @samehkhamis, #1876).
|
||||
@@ -1215,9 +1215,11 @@ every width, right to left it takes the bottom right at every width, and
|
||||
`src/ui/creditLineHeight.js` keeps its height in `--credit-line-height`: the
|
||||
coordinates (and, right to left, the Tactical readout) stay 6px above it
|
||||
however many lines it wraps onto, and the dock and World Timeline rise when
|
||||
it is taller than their usual clearance. Narrower than 1120px the dock leaves
|
||||
no room between the corners, so the coordinates and the readout sit above
|
||||
the dock, and above the World Timeline while it shows. Outside that layout
|
||||
it is taller than their usual clearance. The World Timeline takes the dock's
|
||||
floor and the dock (with the Omnibar's field) sits above it, rising by the
|
||||
bar's height while it shows, as the plain dock does. Narrower than 1120px the
|
||||
dock leaves no room between the corners, so the coordinates and the readout
|
||||
sit above the dock. Outside that layout
|
||||
Cesium's credit box wraps from 1200px, as before; the phone shell, clean
|
||||
view, recording and scene playback lay the line out themselves.
|
||||
The left rail treats the centered World Timeline and voice control as
|
||||
|
||||
@@ -912,10 +912,12 @@ test('Omnibar reserves a non-overlapping desktop footer at native credit sizing'
|
||||
'#command-dock:has(#location-bar:not(.collapsed))',
|
||||
'#command-dock:has(#control-panel:not(.collapsed))',
|
||||
];
|
||||
assert.equal(
|
||||
omnibarVar('--world-timeline-lift'),
|
||||
'0px',
|
||||
'the Omnibar layout holds the timeline lift at 0',
|
||||
// The dock rises over the World Timeline by world-timeline.css's lift, as
|
||||
// the plain dock does; the Omnibar scope leaves the lift alone.
|
||||
assert.doesNotMatch(
|
||||
fs.readFileSync(path.join(ROOT, 'src/ui/styles/omnibar-dock.css'), 'utf8'),
|
||||
/--world-timeline-lift\s*:/,
|
||||
'the Omnibar layout leaves the timeline lift to world-timeline.css',
|
||||
);
|
||||
for (const width of WIDTHS.filter((w) => w >= OMNIBAR_MIN_WIDTH)) {
|
||||
for (const height of HEIGHTS) {
|
||||
@@ -968,10 +970,21 @@ test('Omnibar reserves a non-overlapping desktop footer at native credit sizing'
|
||||
credit.part.startsWith(OMNIBAR_SCOPE),
|
||||
`the Omnibar owns the credit row at ${width}px`,
|
||||
);
|
||||
const dockBottom = omnibarPx(
|
||||
// The dock rises over the World Timeline from the dock's floor, and
|
||||
// the bar takes that floor: the floor is what clears the credit.
|
||||
assert.equal(
|
||||
dock.decl.value,
|
||||
'var(--omnibar-dock-raised)',
|
||||
`Omnibar dock bottom at ${width}px`,
|
||||
);
|
||||
assert.equal(
|
||||
omnibarVar('--omnibar-dock-raised').replace(/\s+/g, ' '),
|
||||
'calc( var(--omnibar-dock-bottom) + var(--world-timeline-lift, 0px) )',
|
||||
);
|
||||
const dockBottom = omnibarPx(
|
||||
'var(--omnibar-dock-bottom)',
|
||||
height,
|
||||
'Omnibar dock bottom',
|
||||
'Omnibar dock floor',
|
||||
);
|
||||
const creditTop =
|
||||
omnibarPx(credit.decl.value, height, 'Omnibar credit bottom') +
|
||||
|
||||
@@ -769,19 +769,38 @@ test('shared panel hooks affect only opted-in rail surfaces without overriding d
|
||||
);
|
||||
});
|
||||
|
||||
test('narrow Omnibar corners clear the World Timeline over the dock', () => {
|
||||
test('the Omnibar dock sits above the World Timeline, and narrow corners clear the dock', () => {
|
||||
const css = read('./styles/omnibar-dock.css');
|
||||
const timeline = css.match(
|
||||
/#world-timeline \{\s*bottom: calc\(var\(--omnibar-dock-bottom\) \+ (\d+)px\);/,
|
||||
// The bar takes the dock's floor; the dock and the field inside it rise by
|
||||
// the bar's lift (world-timeline.css), as the plain dock does.
|
||||
assert.match(
|
||||
css,
|
||||
/#world-timeline \{\s*bottom: var\(--omnibar-dock-bottom\);/,
|
||||
);
|
||||
assert.match(
|
||||
css,
|
||||
/--omnibar-dock-raised: calc\(\s*var\(--omnibar-dock-bottom\) \+ var\(--world-timeline-lift, 0px\)\s*\);/,
|
||||
);
|
||||
assert.match(
|
||||
css,
|
||||
/#command-dock \{[^}]*bottom: var\(--omnibar-dock-raised\);/,
|
||||
);
|
||||
assert.match(
|
||||
css,
|
||||
/#gev-omnibar \{[^}]*bottom: calc\(var\(--omnibar-dock-raised\) \+ 11px\);/,
|
||||
);
|
||||
assert.doesNotMatch(css, /--world-timeline-lift\s*:/);
|
||||
const lift = read('./styles/world-timeline.css').match(
|
||||
/body:has\(#world-timeline\) \{\s*--world-timeline-lift: (\d+)px;/,
|
||||
);
|
||||
const height = read('./styles/world-timeline.css').match(
|
||||
/#world-timeline \{[^}]*\n {2}height: (\d+)px;/,
|
||||
);
|
||||
assert.ok(lift && height && Number(lift[1]) > Number(height[1]));
|
||||
const corners = css.match(
|
||||
/&:has\(#world-timeline\) \{\s*--omnibar-coordinates-bottom: max\(\s*calc\(var\(--omnibar-dock-bottom\) \+ (\d+)px \+ (\d+)px \+ (\d+)px\)/,
|
||||
/--omnibar-coordinates-bottom: max\(\s*calc\(var\(--omnibar-dock-raised\) \+ (\d+)px \+ (\d+)px\)/,
|
||||
);
|
||||
assert.ok(timeline && height && corners);
|
||||
assert.equal(Number(corners[1]), Number(timeline[1]));
|
||||
assert.equal(Number(corners[2]), Number(height[1]));
|
||||
assert.ok(Number(corners[3]) >= 6);
|
||||
assert.ok(corners);
|
||||
assert.equal(Number(corners[1]), 56);
|
||||
assert.ok(Number(corners[2]) >= 6);
|
||||
});
|
||||
@@ -8,11 +8,15 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
/* Clear of the attribution line under it, however many lines it wraps
|
||||
onto (--credit-line-height, src/ui/creditLineHeight.js). */
|
||||
--omnibar-credits-clear: calc(1rem + var(--credit-line-height, 28px) + 6px);
|
||||
/* The dock, and the World Timeline and narrow corners placed from it,
|
||||
/* The World Timeline, and the dock and narrow corners placed from it,
|
||||
rise over a line wrapped taller than its usual one or two lines. */
|
||||
--omnibar-dock-bottom: max(74px, calc(var(--omnibar-credits-clear) + 2px));
|
||||
/* The dock sits above the World Timeline, rising by its height
|
||||
(--world-timeline-lift, world-timeline.css) as the plain dock does. */
|
||||
--omnibar-dock-raised: calc(
|
||||
var(--omnibar-dock-bottom) + var(--world-timeline-lift, 0px)
|
||||
);
|
||||
--omnibar-coordinates-bottom: max(4.25rem, var(--omnibar-credits-clear));
|
||||
--world-timeline-lift: 0px;
|
||||
|
||||
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
|
||||
:is(.hud-top-left, .hud-top-right) {
|
||||
@@ -32,23 +36,14 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
}
|
||||
|
||||
#world-timeline {
|
||||
bottom: calc(var(--omnibar-dock-bottom) + 66px);
|
||||
bottom: var(--omnibar-dock-bottom);
|
||||
width: var(--omnibar-dock-width);
|
||||
}
|
||||
|
||||
&:has(#gev-chat-panel:not([hidden]), #gev-voice-panel:not([hidden]))
|
||||
#world-timeline,
|
||||
&:has(#gev-omnibar.has-results):not(
|
||||
:has(#gev-voice-control[data-assistant-mode='voice'])
|
||||
)
|
||||
#world-timeline {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#command-dock {
|
||||
--dock-voice-width: var(--omnibar-dock-width);
|
||||
top: auto;
|
||||
bottom: var(--omnibar-dock-bottom);
|
||||
bottom: var(--omnibar-dock-raised);
|
||||
z-index: 149;
|
||||
width: var(--omnibar-dock-width);
|
||||
max-width: none;
|
||||
@@ -197,7 +192,7 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
|
||||
#gev-omnibar {
|
||||
top: auto;
|
||||
bottom: calc(var(--omnibar-dock-bottom) + 11px);
|
||||
bottom: calc(var(--omnibar-dock-raised) + 11px);
|
||||
left: 50%;
|
||||
width: calc(var(--omnibar-dock-width) - 120px);
|
||||
transform: translateX(-50%);
|
||||
@@ -235,7 +230,7 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
bottom: calc(100% + 11px);
|
||||
max-height: min(
|
||||
360px,
|
||||
max(0px, calc(100dvh - var(--omnibar-dock-bottom) - 144px))
|
||||
max(0px, calc(100dvh - var(--omnibar-dock-raised) - 144px))
|
||||
);
|
||||
overflow: auto;
|
||||
border-radius: 18px 18px 0 0;
|
||||
@@ -365,16 +360,9 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
rise above the dock. */
|
||||
@media (max-width: 1119px) {
|
||||
--omnibar-coordinates-bottom: max(
|
||||
calc(var(--omnibar-dock-bottom) + 56px + 10px),
|
||||
calc(var(--omnibar-dock-raised) + 56px + 10px),
|
||||
var(--omnibar-credits-clear)
|
||||
);
|
||||
/* And above the World Timeline (42px tall) over the dock. */
|
||||
&:has(#world-timeline) {
|
||||
--omnibar-coordinates-bottom: max(
|
||||
calc(var(--omnibar-dock-bottom) + 66px + 42px + 10px),
|
||||
var(--omnibar-credits-clear)
|
||||
);
|
||||
}
|
||||
#intel-hud[data-variant='tactical'] .hud-bottom-right,
|
||||
&:where(html[dir='rtl'] *):not(.context-docked)
|
||||
#intel-hud[data-variant='tactical']
|
||||
|
||||
Reference in new issue
Block a user