refactor(panels): read panel state from the panel chrome store

PanelChrome, its collapse-preference restore and the phone shell read a
panel's disclosure state back from the gev-panel-chrome store
(_shownPanel), falling back to the markup's classes before the panel is
first presented, instead of reading the classes v-panel-state draws. The
share link and the phone shell share one rule for a panel the person keeps
closed (prefersCollapsed). The rails, the accordion and the hover
disclosure still read the classes, which the directive draws in the same
task as their layout.
This commit is contained in:
Sameh Khamis committed 2026-11-01 14:48:31 -08:00
1 parent 4c92f517db
commit 9ed9098593
12 files changed
+117 -49

No files matched your search

+1
View File
@@ -858,6 +858,7 @@ export class StyleManager extends ShellFacade {
this._mobileShell = initMobileShell({
setPanelCollapsed: (panelId, collapsed, options) =>
this._panelChrome.setPanelCollapsed(panelId, collapsed, options),
readPanel: (panel) => this._panelChrome._shownPanel(panel),
onSheetsClosed: () => this._syncShareState(),
onTabOpened: (sheet) => {
void this._onMobileTabOpened(sheet);