Repository navigation
feat(shell): phase 2 navigation chrome (context bar, dock, customizer, top bar, command palette) - #195
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inLayout::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
<Layout::ContextBar @crumbs? @chips? @brand?>context-barservice (args override it). Crumbs are{ label, route?, models?, query?, menu?, split?, color? }: plain crumbs (earlier ones navigate, the last isaria-current="page"), menu crumbs (menu: [items]) and split crumbs (⧉). Chips are{ label, tone }with toneinfo,warn,okorerror;menumakes the chip a menu button. Keeps#view-header-left-content-aand-b.<Layout::Dock @items? @roles?>+Dock::Item,Dock::Tooltip,Dock::Flyoutcolorand has an indicator bar. Choosing a module navigates to it and opens a flyout of its pages:menuService.getMenuPanels('engine:<id>')as groups plus loosegetMenuItems, 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), soLayout::YieldSidebarwormholes land inside it. It is shown only while the flyout is open on the current module.<Layout::DockCustomizer @roles? @onClose>(K6)dock.canManageRoles, a role picker edits that role's default dock with per-module lock toggles, and Done saves it withsetRoleDefaults(decision 8). The behaviour toggles (badges, open on hover, pinned rail, position, size) apply immediately.<Layout::TopBar @environment? @environmentTone? @onAction? @timezones?>NotificationTrayandChatTray, 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-itemsandRegistryYield @registry="header-tray-items"inside the tray.@onActionreceives the classic header's action names (switchOrganization,createOrJoinOrg,showKeyboardShortcuts,viewChangelog,invalidateSession) pluschangeTimezone.<CommandPalette @providers? @includeNavigation?>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><:panel>block, arrow keys, Esc, outside click).Services and helpers added in ember-ui:
command-palette:isOpen,scope,open(scope),close(),toggle(), andregister(), which records that a palette owns ⌘K.dock-preferences: per-user behaviour toggles, saved as thedock-preferencesuser 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:dockservice:items,hiddenItems,lockedIds,reorder,hide,show,roleDefaults,setRoleDefaults,canManageRoles. Also read when present:rolesandresetToDefault(). Without the service, the dock falls back touniverse.headerMenuItemsand the customizer offers only the behaviour toggles.context-barservice:crumbs,chips.color,status,badge,shortcut,group.universe.getSearchProviders().The tests stub
dockandcontext-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::YieldSidebarlanding 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).