GlobalPanelService
Holds the UI state of the shells global panel (the side panel hosting global apps). Collapsed state, width and the active app are persisted on the users device, because layout settings are highly device dependent.
Properties
Section titled “Properties”activeApp
Section titled “activeApp”Type: unknown
Default Value: computed<ShellGlobalApp | undefined>(() => \{ const apps = this.apps(); const id = this.#activeAppId(); return apps.find((a) => a.id === id) ?? apps[0]; \})
The active global app. Falls back to the first app if no (or an unknown) app has been activated before.
Type: unknown
Default Value: computed(() => this.#feature.getAvailableGlobalApps(this.#shell.globalApps()))
Global apps the current user may use (requirements, permissions and feature configuration are checked the same way as for routed apps).
collapsed
Section titled “collapsed”Type: unknown
Default Value: signal<boolean>(this.#initialState.collapsed)
hasApps
Section titled “hasApps”Type: unknown
Default Value: computed(() => this.apps().length > 0)
minWidth
Section titled “minWidth”Type: unknown
Default Value: GLOBAL_PANEL_MIN_WIDTH
overlayOpen
Section titled “overlayOpen”Type: unknown
Default Value: signal<boolean>(false)
Whether or not the panel is opened as an overlay (small screen layout only). Not persisted, so the panel always starts closed on small screens.
Type: unknown
Default Value: signal<number>(this.#clampWidth(this.#initialState.width))
Methods
Section titled “Methods”activate
Section titled “activate”Activate a global app. This also expands the panel if it is collapsed.
activate(id: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| id | string |
closeOverlay
Section titled “closeOverlay”closeOverlay(): voidmaxWidth
Section titled “maxWidth”Current maximum width of the panel in pixel (depends on the viewport width).
maxWidth(): numberopenOverlay
Section titled “openOverlay”openOverlay(): voidsetWidth
Section titled “setWidth”Set the panels width. The width will be clamped to sensible bounds.
setWidth(width: number): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| width | number |
toggleCollapsed
Section titled “toggleCollapsed”toggleCollapsed(): void