From 95a0be13b6678fdae5dca2928928ef9630035f77 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 14 Nov 2026 15:51:13 -0800 Subject: [PATCH] Open the cockpit panels from the rail in one step and give focus back to it The rail's buttons are disclosures (aria-expanded, aria-controls) and go through one toggleCockpitUtility action, which already keeps one panel open. Collapsing returns focus to the rail when the launcher's toggle is hidden. The edge switch is gone: edge mode does not apply in the cockpit. Co-authored-by: Manjunath Paparaju --- src/cockpitMarkup.test.mjs | 57 +++++++++++++------ src/ui/cockpitUtilityControls.test.mjs | 39 +++++++++++++ src/ui/radioBindings.js | 26 +++++++-- .../views/panels/CockpitUtilityControls.vue | 38 ++++--------- 4 files changed, 112 insertions(+), 48 deletions(-) diff --git a/src/cockpitMarkup.test.mjs b/src/cockpitMarkup.test.mjs index 3f461c392..791fdbdb2 100644 --- a/src/cockpitMarkup.test.mjs +++ b/src/cockpitMarkup.test.mjs @@ -26,10 +26,7 @@ import { setSignalCollapsed, } from './ui/cockpitLayout.js'; import { createBriefState } from './ui/cockpitBriefPages.js'; -import { - publishBriefView, - setBriefAutoRotate, -} from './ui/cockpitBriefing.js'; +import { publishBriefView, setBriefAutoRotate } from './ui/cockpitBriefing.js'; import { CockpitDisplayPortal } from './ui/cockpitDisplayPortal.js'; import { _handleContextLayerChange } from './ui/contextLayerChanges.js'; import { clearSelectedLayers } from './ui/contextActions.js'; @@ -438,13 +435,10 @@ test('Cockpit owns a focused shared Display portal and compact Radio controls', /data-cockpit-launcher="radio"[\s\S]*?id="cockpit-radio-toggle-btn"/, ); const cockpitRadio = html.match( - /id="cockpit-radio-panel"[\s\S]*?<\/div>\s*<\/div>\s*<\/aside>/, + /id="cockpit-radio-panel"[\s\S]*?<\/div>\s*<\/div>\s*
]*@click="act\('reset'\)"/); + assert.match( + globeActions, + /id="reset-globe-view"[^>]*@click="act\('reset'\)"/, + ); const cockpitView = readRadioSource( new URL('./ui/views/CockpitView.vue', import.meta.url), 'utf8', ); - assert.match(cockpitView, /id="cockpit-reset-globe"[^>]*@click="globe\.act\('reset'\)"/); + assert.match( + cockpitView, + /id="cockpit-reset-globe"[^>]*@click="globe\.act\('reset'\)"/, + ); assert.match( cockpitEnter.toString(), /Object\.assign\(this\.presence, \{\s*active: true,/, @@ -1193,7 +1196,10 @@ test('cockpit summary presents the focused item as Contact', () => { const match = html.match(/