From d211b9dfc0a81804dd393b8c9e3d39f04f8c68cd Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 15:47:27 -0800 Subject: [PATCH] Lay the right panels out again once the Stories card has faded in The card fades in from transparent, and the right column skips transparent obstacles, so the layout run when the card arrived missed it and the column stayed under it until something else moved the panels. The end of the fade now lays the column out again; it also replays when the card is shown again after the loading screen, recording or clean view. Co-authored-by: Manjunath Paparaju --- src/ui/panelLayoutController.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ui/panelLayoutController.js b/src/ui/panelLayoutController.js index 7b21b72d09..1043108301 100644 --- a/src/ui/panelLayoutController.js +++ b/src/ui/panelLayoutController.js @@ -104,6 +104,8 @@ export class PanelLayoutController { this._rightStackReconsiderAutoCollapse = false; this._rightStackResizeObserver = null; this._storiesCardObserver = null; + this._storiesCardShownHandler = null; + this._storiesHost = null; this._cockpitLayoutFrame = null; this._cockpitLayoutTimer = null; this._leftPanelStack = document.getElementById('left-panel-stack'); @@ -260,8 +262,12 @@ export class PanelLayoutController { }); // The Stories card comes and goes inside the Stories view; only its // arrival or departure moves the rail, not the view's other changes. + // It fades in from transparent, which the layout skips, so the end of + // that fade (also replayed when the card is shown again after being + // hidden) lays the rail out once more. const storiesHost = document.getElementById('gev-stories-host'); if (storiesHost) { + this._storiesHost = storiesHost; this._storiesCardObserver = new MutationObserver((records) => { if (records.some(movesStoriesCard)) this._scheduleRightPanelLayout(); }); @@ -269,6 +275,13 @@ export class PanelLayoutController { subtree: true, childList: true, }); + this._storiesCardShownHandler = (event) => { + if (event.target?.id === 'hPop') this._scheduleRightPanelLayout(); + }; + storiesHost.addEventListener( + 'animationend', + this._storiesCardShownHandler, + ); } const hud = document.getElementById('intel-hud'); if (hud) { @@ -493,6 +506,11 @@ export class PanelLayoutController { this[field]?.disconnect(); this[field] = null; } + this._storiesHost?.removeEventListener( + 'animationend', + this._storiesCardShownHandler, + ); + this._storiesHost = this._storiesCardShownHandler = null; for (const field of [ '_leftStackHudTransitionHandler', '_rightStackHudTransitionHandler',