Skip to content

feat(shell): phase 2 navigation chrome (context bar, dock, customizer, top bar, command palette) - #195

Merged
roncodes merged 1 commit into
feature/map-canvasfrom
feat/shell-navigation-chrome
Nov 27, 2026
Merged

roncodes merged 1 commit into
feature/map-canvasfrom
feat/shell-navigation-chrome

Conversation

@roncodes

Copy link
Copy Markdown
Member

Shell phase 2 of the Map-Canvas+ redesign: the navigation chrome that floats over Layout::Canvas. Everything is additive. The classic layout is untouched apart from one guard in Layout::Sidebar::Navigator: it leaves ⌘K alone while a <CommandPalette /> is mounted. All colours come from the phase 1 tokens (addon/styles/layout/shell.css).

Components

Component What it does
<Layout::ContextBar @crumbs? @chips? @brand?> Logo, breadcrumbs and context chips, read from the context-bar service (args override it). Crumbs are { label, route?, models?, query?, menu?, split?, color? }: plain crumbs (earlier ones navigate, the last is aria-current="page"), menu crumbs (menu: [items]) and split crumbs (⧉). Chips are { label, tone } with tone info, warn, ok or error; menu makes the chip a menu button. Keeps #view-header-left-content-a and -b.
<Layout::Dock @items? @roles?> + Dock::Item, Dock::Tooltip, Dock::Flyout Icon-only dock, sized to its items. The tooltip on the right shows name, ⌘ shortcut and status on hover and focus, and the item's accessible name includes the status. The current module is filled in its color and has an indicator bar. Choosing a module navigates to it and opens a flyout of its pages: menuService.getMenuPanels('engine:<id>') as groups plus loose getMenuItems, with a filter field. The flyout can be pinned as a rail. Keyboard: ↑/↓/Home/End roving focus, → opens the flyout, Esc closes it, ⌘1–⌘9 jump to modules, ⌘0 opens "All apps". Adapter: the flyout always renders #sidebar-menu-items (hidden while closed), so Layout::YieldSidebar wormholes land inside it. It is shown only while the flyout is open on the current module.
<Layout::DockCustomizer @roles? @onClose> (K6) Reorder (drag, ↑/↓ buttons, Alt+↑/↓), remove to "All apps" and add back. Changes stay a draft until Done; Cancel or Esc discards them. Items locked for the person's role can't be removed. When dock.canManageRoles, a role picker edits that role's default dock with per-module lock toggles, and Done saves it with setRoleDefaults (decision 8). The behaviour toggles (badges, open on hover, pinned rail, position, size) apply immediately.
<Layout::TopBar @environment? @environmentTone? @onAction? @timezones?> Search trigger, existing NotificationTray and ChatTray, env chip, organization switcher, and an account menu with language, time zone, theme (Light/Dark/Auto) and links. Keeps #view-header-actions, #view-header-tray-items and RegistryYield @registry="header-tray-items" inside the tray. @onAction receives the classic header's action names (switchOrganization, createOrJoinOrg, showKeyboardShortcuts, viewChangelog, invalidateSession) plus changeTimezone.
<CommandPalette @providers? @includeNavigation?> Global ⌘K/Ctrl+K. Groups results from universe.getSearchProviders() plus a built-in modules-and-pages provider. Scope chips (All + one per provider, Tab/Shift+Tab). ↑/↓/Enter/Esc. Failing providers are skipped, and stale searches never replace newer ones.
<Layout::ChromeMenu> Shared popover menu used by the crumbs, chips, org switcher and account menu (items list or a <:panel> block, arrow keys, Esc, outside click).

Services and helpers added in ember-ui:

  • command-palette: isOpen, scope, open(scope), close(), toggle(), and register(), which records that a palette owns ⌘K.
  • dock-preferences: per-user behaviour toggles, saved as the dock-preferences user option.
  • {{set-css-var}} modifier.
  • utils/shell.

Contract with ember-core (consumed defensively)

ember-ui still depends on the published @fleetbase/ember-core ^0.3.x, so every new API is looked up as optional and nothing asserts:

  • dock service: items, hiddenItems, lockedIds, reorder, hide, show, roleDefaults, setRoleDefaults, canManageRoles. Also read when present: roles and resetToDefault(). Without the service, the dock falls back to universe.headerMenuItems and the customizer offers only the behaviour toggles.
  • context-bar service: crumbs, chips.
  • Header menu items: optional color, status, badge, shortcut, group.
  • universe.getSearchProviders().

The tests stub dock and context-bar (tests/helpers/shell-stubs.js), and also cover the paths where they are missing.

Tests

Rendering and interaction tests for every component and state: tooltip on hover and on focus, pinned flyout and rail, adapter element present (with a real Layout::YieldSidebar landing in it), customizer reorder/remove/add/lock/role defaults, palette keyboard flow and scopes, top-bar menus. The 100% per-file coverage gate holds (test:ci).

Adds Layout::ContextBar, Layout::Dock (+ Dock::Item, Dock::Tooltip,
Dock::Flyout), Layout::DockCustomizer, Layout::TopBar, CommandPalette and
the shared Layout::ChromeMenu, styled from the phase 1 tokens.

- The dock reads ember-core's dock service (falls back to
  universe.headerMenuItems), shows a tooltip on hover and focus, fills the
  current module in its colour, opens a flyout of engine:<id> pages that can
  be pinned as a rail, and supports arrow keys and Cmd/Ctrl+1-9 (0 = All apps).
- The flyout always renders #sidebar-menu-items so Layout::YieldSidebar
  wormholes land inside it.
- The customizer reorders, adds and removes modules, and for admins edits a
  role's default dock with locked items.
- The top bar keeps #view-header-actions, #view-header-tray-items and the
  header-tray-items RegistryYield.
- CommandPalette owns Cmd/Ctrl+K while mounted; Layout::Sidebar::Navigator
  leaves the shortcut alone then and keeps it in the classic layout.
- New services: command-palette, dock-preferences. New modifier: set-css-var.

ember-core's dock, context-bar and getSearchProviders are optional lookups;
tests stub them and cover their absence.
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (88b07ba) to head (5d1c151).
⚠️ Report is 1 commits behind head on feature/map-canvas.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feature/map-canvas      #195    +/-   ##
=====================================================
  Coverage              100.00%   100.00%            
=====================================================
  Files                     338       350    +12     
  Lines                    9369      9876   +507     
=====================================================
+ Hits                     9369      9876   +507     
Flag Coverage Δ
ember-ui 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
addon/components/command-palette.js 100.00% <100.00%> (ø)
addon/components/layout/chrome-menu.js 100.00% <100.00%> (ø)
addon/components/layout/context-bar.js 100.00% <100.00%> (ø)
addon/components/layout/dock-customizer.js 100.00% <100.00%> (ø)
addon/components/layout/dock.js 100.00% <100.00%> (ø)
addon/components/layout/dock/flyout.js 100.00% <100.00%> (ø)
addon/components/layout/dock/tooltip.js 100.00% <100.00%> (ø)
addon/components/layout/sidebar/navigator.js 100.00% <100.00%> (ø)
addon/components/layout/top-bar.js 100.00% <100.00%> (ø)
addon/modifiers/set-css-var.js 100.00% <100.00%> (ø)
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roncodes
roncodes merged commit d45830c into feature/map-canvas Nov 27, 2026
7 checks passed
@roncodes
roncodes deleted the feat/shell-navigation-chrome branch November 27, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant