Hand focus to a rail entry when a panel folds it away

- When F or a panel's collapse button folds a panel that holds the focus,
  the focus moves to that panel's visible rail entry. The same happens when
  opening Data Layers folds a peer panel that held it, and in Cockpit the
  focus moves to Contact's expand button when that card folds.
- The `shownBy: 'active'` rail gate is gone: nothing removes `.active` from
  Data Layers any more, so a rail entry now follows `panel.hidden`.
- CURRENT-STATE says what F does, and the panel catalog comment no longer
  says F toggles `.active`.
This commit is contained in:
German Khokhlov committed 2026-11-19 15:00:17 +04:00
1 parent 3a24768a2d
commit c7df3c6798
9 files changed
+179 -40

No files matched your search

+3 -8
View File
@@ -7,16 +7,11 @@ export const PANEL_RAIL_HOST_CLASS = 'gev-panel-rail';
export const PANEL_RAIL_FALLBACK_ICON = 'more_horiz';
/**
* How each side panel appears on its rail. Labels are the panels' own titles.
* `shownBy` names a class the panel needs to be shown at all (`f` toggles
* Data Layers' `active`). `context` is the label's translation context.
* How each side panel appears on its rail. Labels are the panels' own titles;
* `context` is the label's translation context.
*/
export const PANEL_RAIL_ITEMS = Object.freeze({
'data-panel': {
icon: 'layers',
label: msg('DATA LAYERS'),
shownBy: 'active',
},
'data-panel': { icon: 'layers', label: msg('DATA LAYERS') },
'utilities-panel': { icon: 'handyman', label: msg('UTILITIES') },
'scene-panel': { icon: 'movie', label: msg('AUTHORING') },
// `context` keeps the panel's name apart from the satellite class of the