Skip to content

GlobalPanelService

service

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.

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).

Type: unknown

Default Value: signal<boolean>(this.#initialState.collapsed)

Type: unknown

Default Value: computed(() => this.apps().length > 0)

Type: unknown

Default Value: GLOBAL_PANEL_MIN_WIDTH

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))

Activate a global app. This also expands the panel if it is collapsed.

activate(id: string): void
NameTypeDescription
idstring
closeOverlay(): void

Current maximum width of the panel in pixel (depends on the viewport width).

maxWidth(): number
openOverlay(): void

Set the panels width. The width will be clamped to sensible bounds.

setWidth(width: number): void
NameTypeDescription
widthnumber
toggleCollapsed(): void