mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
2035c767ce
commit
eed7657516
9 files changed
+124
-58
No files matched your search
@@ -97,3 +97,20 @@ test('restored preferences keep every saved panel open for the layout to normali
|
||||
} finally { globalThis.document = prior; }
|
||||
}
|
||||
});
|
||||
|
||||
test('a feature revealing a side panel makes it the side owner', () => {
|
||||
const f = fixture('tactical'), prior = globalThis.document;
|
||||
globalThis.document = f.doc;
|
||||
try {
|
||||
f.owner.setPanelCollapsed('pp-toggles', false, { explicit: true });
|
||||
f.claimed.length = 0;
|
||||
// Street Level's viewer or a selected radio station opens its panel
|
||||
// without an explicit user disclosure.
|
||||
f.owner.setPanelCollapsed('radio-panel', false);
|
||||
assert.equal(f.context.classList.contains('collapsed'), false);
|
||||
assert.equal(f.display.classList.contains('collapsed'), true);
|
||||
assert.equal(f.owner._panelLayout._rightStackPreferredPanelId, 'global-context-panel');
|
||||
// Only a user's choice claims restoration lanes.
|
||||
assert.deepEqual(f.claimed, []);
|
||||
} finally { globalThis.document = prior; }
|
||||
});
|
||||
Reference in new issue
Block a user