workbench_shell library
VS Code-style workbench layout shell.
Provides the activity-bar + sidebar + editor-area + bottom-panel + status-bar chrome. Consumer fills content via builder callbacks. Depends only on Flutter — no GetIt, no application packages.
Classes
- ActivityBarItem
- Descriptor for a single activity bar icon.
- NotificationAction
- A button rendered inside a notification card.
- NotificationHost
- Overlay anchored to the bottom-right of the workbench that renders the stacked toast cards owned by NotificationService.
- NotificationProgressController
- Controller returned by NotificationService.showProgress.
- NotificationService
- Workbench-level notification service.
- PanelLifecycle
-
Read-only handle a panel content widget consumes to react to focus
transitions. Surfaced as a ValueListenable<bool> so consumers
subscribe through the standard Flutter listenable patterns
(
ListenableBuilder,addListener). - PanelLifecycleController
-
Concrete PanelLifecycle backed by a ValueNotifier. The host
(typically
WorkbenchPanelHost) owns the controller and flips isFocused as visibility and the active tab change; panel content only sees the listenable view. - PanelTabBadge
- Typed badge payload rendered inline next to a tab label.
- SidebarSlot
- A sidebar extension slot registered by the host.
- SlotRegistry
- Registry mapping SlotIds to widget builders and holding SidebarSlot registrations for the activity bar.
- ToggleBottomPanelIntent
-
Workbench command intents published by
workbench_shell. - TokenStyle
- Visual style for a single syntax token scope.
- TokenTheme
- Resolves TextMate scope strings to TokenStyle values.
- VscodeColorMap
- Parsed representation of a VS Code color theme JSON file.
- VscodeColorThemeLoader
- Parses VS Code color theme JSON into a VscodeColorMap.
- WorkbenchCard
- Bordered container for an inline list item or grouped fields. No implicit heading.
- WorkbenchEmptyState
- Centered icon + title + subtitle + optional action.
- WorkbenchLayout
- VS Code-style workbench layout with activity bar, sidebar, editor area, bottom panel, and status bar.
- WorkbenchLayoutConstants
- Geometry constants for the VS Code-style workbench layout.
- WorkbenchMenuBar
- Platform-aware workbench menu bar.
- WorkbenchNotification
- A live notification managed by NotificationService.
- WorkbenchPanel
- Single declaration of one bottom-panel tab.
- WorkbenchPanelHost
- Composes a list of WorkbenchPanel descriptors into the View menu, tab strip, keyboard-shortcut map, and per-panel PanelLifecycle signaling — the four surfaces consumers used to maintain in parallel.
- WorkbenchPanelScope
- Scope handed to WorkbenchPanelHost.builder: pre-composed pieces the consumer wires into the surrounding chrome.
- WorkbenchPanelTab
- Descriptor for one tab in a WorkbenchTabbedPanel.
- WorkbenchSection
- Top-level grouping inside a sidebar or panel. Renders title uppercased — the shell owns the transform so consumers cannot diverge (§spec:capability-boundary canon enforcement, §spec:chrome-typography-canon pane-header semantics) — in WorkbenchTheme.sectionTitle with an optional info tooltip icon.
- WorkbenchShortcuts
- Keyboard shortcut wrapper for the one command the shell defaults: Cmd/Ctrl+J to toggle the bottom panel.
- WorkbenchStatusBar
- Container for status-bar items at the bottom of the workbench.
- WorkbenchStatusBarAction
- Tappable status-bar affordance: optional icon + label + onTap. Use for items that trigger an action (e.g. open a dialog, focus a tab) — never for panel-visibility toggles.
- WorkbenchStatusBarItem
- Read-only status indicator: optional icon + label.
- WorkbenchStatusBarProblemsItem
- VS Code-style "Problems" status-bar indicator: three role-coloured counts (errors, warnings, info) sharing a single tap target.
- WorkbenchSubsection
- Second-level grouping inside a section. Visually subordinate to WorkbenchSection but still acts as a header.
- WorkbenchTabbedPanel
- Tabbed bottom-panel chrome primitive.
- WorkbenchTheme
- Color and typography tokens for workbench layout chrome and content primitives.
- WorkbenchThemeController
- Owns active workbench theme state and exposes a theme-list / pick API.
- WorkbenchThemeEntry
- An entry in a WorkbenchThemeController's theme list.
- WorkbenchToggleCard
- Bordered card whose header row contains a leading toggle and a subsection-style title. When enabled is false, child is dimmed and input is suppressed, but layout does not reflow. The toggle itself remains interactive so callers can re-enable.
- WorkbenchViewMenuTab
- Descriptor for a bottom-panel tab the View menu can select. The shell does not own tab content (see package SPEC §spec:tabbed-panel); it only owns the menu chrome.
Enums
- ActivityBarZone
- Zone within the activity bar where an item icon renders.
- NotificationSeverity
- Severity for a Notification.
- SidebarZone
- Zone within the activity bar where a sidebar slot icon renders.
- SlotId
- Identifiers for UI extension slots a host can populate.
Extensions
- NotificationSeverityPersistence on NotificationSeverity
- Convenience predicate for the persistence rule (SPEC §spec:notification-center "Dismissal policy by severity"). Warning, error, and progress cards stay until manually or programmatically dismissed; info and success auto-dismiss.
- WorkbenchThemeContentBorder on WorkbenchTheme
- Helper for content-primitive widgets that need a concrete Color regardless of whether the theme suppresses the chrome panel border. When WorkbenchTheme.panelBorder is null the helper falls through to Colors.transparent — content primitives outside the workbench chrome still lay out identically, they just render edgelessly.
- WorkbenchThemeExtension on BuildContext
- Convenience accessor for WorkbenchTheme from BuildContext.
- WorkbenchThemeNotificationSeverity on WorkbenchTheme
- Severity-keyed accents for notification cards. Reuses the existing semantic-status tokens (WorkbenchTheme.infoForeground, etc.) so notification chrome stays consistent with other severity-aware surfaces (gutter icons, problems panel, etc.).
Functions
-
applyWorkbenchChrome(
ThemeData base, WorkbenchTheme chrome) → ThemeData -
Compose the workbench chrome's Material theming onto a host's
baseThemeData.
Typedefs
- PanelContentBuilder = Widget Function(BuildContext context, PanelLifecycle lifecycle)
- Builder signature for panel content. Receives the surrounding BuildContext and the per-panel PanelLifecycle so content widgets can subscribe to focus transitions (replay an animation when refocused, pause heavy work when blurred, etc.).
- WorkbenchPanelScopeBuilder = Widget Function(BuildContext context, WorkbenchPanelScope scope)
- Builder signature for WorkbenchPanelHost.builder.