fix(ui): let revealed panels own their side and keep Cockpit's left strip

A panel a feature opens (Street Level's viewer, a selected radio station)
now becomes its side's open panel instead of being collapsed again by the
next layout pass. Cockpit keeps showing its collapsed Data Layers strip,
which Cyber's Cockpit layout aligns to, and Cyber's focus layout no longer
re-shows collapsed left panels. Both sidebars share one accordion helper.
This commit is contained in:
Sameh Khamis committed 2026-10-30 16:41:29 -07:00
1 parent 2035c767ce
commit eed7657516
9 files changed
+124 -58

No files matched your search

+14
View File
@@ -777,3 +777,17 @@ test('right layout ignores a hidden panel: no lane, no gap, no auto-collapse', (
) <= alone,
);
});
test('left rail keeps collapsed panels shown beside Cockpit, still one open', () => {
const f = fixture('left');
f.options.documentRef.body = {
classList: { contains: (name) => name === 'cockpit-mode' },
};
f.expand(f.first, 250);
f.expand(f.second, 250);
f.options.preferredPanelId = f.second.id;
f.run();
assert.equal(f.first.classList.contains('accordion-collapsed'), true);
assert.equal(f.stack.classList.contains('layout-exclusive'), false);
assert.equal(f.first.getAttribute('aria-hidden'), undefined);
});