Keep rail icons in place and move only the highlight

The left rail no longer lifts its open icon out beside the panel title or
reorders the rest behind it. Every icon keeps its place, open or not, and
the rail's shared highlight slides to the open one, on both rails.

The rail also holds one height whichever panel is open: its offset now
allows for the stack rising by a different amount for a tall panel than at
rest.

Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
Manjunath PaparajuandSameh Khamis authored and Sameh Khamis committed 2026-11-14 13:41:07 -08:00
1 parent 59ffa87535
commit b090937e5f
5 files changed
+30 -72

No files matched your search

+13 -4
View File
@@ -359,14 +359,23 @@ test('right rail aligns to the left rail buttons while the left stack is offset'
assert.equal(f.stack.dataset.safeTop, '286.7');
});
test('left rail buttons hold still while a tall panel moves the stack', () => {
test('left rail buttons hold still whether the open panel is short or tall', () => {
// Where the rail sits: the stack's top, the stack's rise, and the rail's
// own offset inside the stack.
const railTop = (stack) =>
(parseFloat(stack.style.getPropertyValue('--left-stack-safe-top')) * 900) /
100 +
parseFloat(stack.style.getPropertyValue('--panel-rail-lift')) +
parseFloat(stack.style.getPropertyValue('--panel-rail-offset'));
const short = fixture('left');
short.expand(short.first, 250);
short.run();
const f = fixture('left');
f.expand(f.first, 900);
f.run();
assert.equal(f.stack.dataset.layoutMode, 'focus');
assert.ok(
parseFloat(f.stack.style.getPropertyValue('--panel-rail-offset')) > 0,
);
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) =>