mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat(ui): keep one side panel open per desktop sidebar in every HUD layout
The Cyber accordion now applies to both sidebars and every HUD layout: opening a side panel collapses its peers, the layout normalizes restored state to one owner, and collapsed panels are hidden on desktop. Phones keep showing several panels per sheet.
This commit is contained in:
1 parent
7307c11c74
commit
2035c767ce
12 files changed
+178
-214
No files matched your search
@@ -60,19 +60,3 @@ export function resolveHudRailLayout({
|
||||
constrained: panelHeight > availableHeight,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Tactical HUD gives an expanded right-rail panel the whole control lane.
|
||||
* Other HUD layouts keep collapsed launchers visible for quick switching.
|
||||
*
|
||||
* @param {object} input Current rail state.
|
||||
* @param {string} input.hudVariant Active HUD layout variant.
|
||||
* @param {boolean} input.hasExpandedPanel Whether any rail panel is expanded.
|
||||
* @returns {boolean} Whether collapsed sibling launchers should be hidden.
|
||||
*/
|
||||
export function shouldHideCollapsedRightPanels({
|
||||
hudVariant,
|
||||
hasExpandedPanel,
|
||||
}) {
|
||||
return hudVariant === 'tactical' && Boolean(hasExpandedPanel);
|
||||
}
|
||||
Reference in new issue
Block a user