Repository navigation
Conversation
Shell phase 1 (foundations), additive and opt-in; the classic layout is unchanged. - styles/tokens.css: --fb-* CSS variables under [data-theme=light|dark] (light also on :root) for surface, text, accent, chrome, status, map, dot-grid canvas, radius, shadow and content insets; mapped into tailwind.config.js (bg-surface, text-muted, rounded-chrome, ...). - Layout::Canvas: backdrop (named block, defaults to the dot grid), content (<main>, positioned by the inset variables) and chrome (named block; pointer-events none on the layer, auto on children). Optional @theme scopes a theme to the canvas. - Layout::Canvas::Backdrop::DotGrid. - @fleetbase/ember-ui/test-support: setupShellTheme, setShellTheme, snapshotShellTheme, eachShellTheme, renderShell, shellToken. - Rendering tests for every component and state in both themes, token value tests, and a node test for the Tailwind mapping.
Member
Author
|
Superseded by #194 (same change, moved to the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #193 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 338 338
Lines 9369 9369
=========================================
Hits 9369 9369
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 1 (foundations) of the Map-Canvas+ console redesign. This change only adds things and is opt-in: no existing component or style changes, and nothing in the classic layout reads the new tokens.
What's added
Design tokens:
addon/styles/tokens.css--fb-*CSS variables under[data-theme='light'](also on:root) and[data-theme='dark']: surface, subtle, border, text, muted, accent, accent-fg, focus, chrome glass and its border, info/warn/ok/critical (each with a-subtlebackground), map land/water/road/route, the dot-grid canvas (light#EEF1F5/#B8C3D1, dark#0B1220/#26344F, 22px), and chrome and sheet shadows.addon.css. Mapped intailwind.config.jstobg-surface,text-muted,border-border,text-text,bg-accent,ring-focus,bg-chrome,text-info/bg-info-subtle(and the same for warn, ok and critical),bg-map-*,bg-canvas,rounded-control|card|chrome|dock,shadow-chrome|sheet, and spacingcanvas-left|top|bottom|right. No existing class names clash.<Layout::Canvas @theme?>: the shell root, with three layers stacked lowest first:<:backdrop>: defaults to the dot grid.<main>placed by the inset variables.<:chrome>: the layer haspointer-events: noneand its direct children haveauto. It renders only when the block is passed.@themescopes a theme to the canvas alone.<Layout::Canvas::Backdrop::DotGrid />: decorative (hidden from screen readers). Change the grid size withstyle="--fb-canvas-grid: …".Shell test helpers:
@fleetbase/ember-ui/test-support(newaddon-test-support/)SHELL_THEMES,setShellTheme,snapshotShellTheme,setupShellTheme(hooks),eachShellTheme(cb),renderShell(template, { theme }), which returns.fb-canvasornull, andshellToken(name, el).Tests
tests/node/tokens-tailwind-test.cjschecks that the utilities compile to the variables and that every variable the config references is defined (run it withnode --test tests/node).The coverage gate passes: every addon file,
addon-test-support/index.jsincluded, is at 100% for statements, branches, functions and lines.Local run note: the run used a
node_moduleswith ember-core from the workspace (0.3.27) because 0.3.25 is missing from the local store. With that setup, 4 existing tests fail: filter/model name path, the navigator search-result style, and thedriver/pillresource-component tests. 3 of them also fail on the untouched base commitae839f8in the same environment, and the 4th checks the samedriver/pilllookup. CI with a clean install is the real check.Out of scope
The dock, context bar, taskbar, ember-core services, console wiring (
layoutflag,?layout=canvas) and engines come in later phases.