Repository navigation
added z-index soft scale - #3397
LinKCoding wants to merge 35 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit 823d46a
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3397 +/- ##
==========================================
- Coverage 91.33% 90.84% -0.49%
==========================================
Files 407 277 -130
Lines 6840 5920 -920
Branches 2226 2014 -212
==========================================
- Hits 6247 5378 -869
+ Misses 584 533 -51
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c09f2fd to
715f4f0
Compare
|
📬 Published Alpha Packages:
|
|
🚀 Styleguide deploy preview ready! Preview URL: https://6ac3fec9ba0c0624c12c28a9--gamut-preview.netlify.app |
Overview
Introduces a semantic z-index scale for Gamut so components stack predictably instead of relying on scattered magic numbers.
zIndexestoken scale (packages/gamut-styles/src/variables/zIndexes.ts) with values spaced by 100 —underlay,base,foreground,floating,appBar,flyout,modal,popover,topmost— resolving to CSS vars (e.g.var(--zIndexes-modal)).zIndexsystem prop to the new scale (scale: 'zIndexes') while adding anallowRawValueescape hatch to the variancePropconfig so raw numeric/global values (e.g.zIndex={550}) are still accepted for deliberate in-between cases.isolationsystem prop so components can establish a local stacking context (isolation: 'isolate') without needing apositionchange.no-raw-z-indexESLint rule (packages/eslint-plugin-gamut) that flags raw numericzIndexvalues in style objects and JSX props, and enables it in the recommended config.Overlay/Modal,Flyout,Popover/PopoverContainer,Menu,SelectDropdown,Tabs,Tip(PreviewTip/shared),Toaster,List/TableHeader,DataListEmptyRows,BodyPortal,PatternBackdrop,ProgressBar,Typography/Text,Anchor,BarChartGridLines, andDatePickercalendar elements.BodyPortal's default z-index to thefloatingtoken and addsisolation, with new tests (BodyPortal.test.tsx).SelectDropdown's menu portal default z-index and adds coverage (SelectDropdown.test.tsx).gamut-z-indexagent skill (and relatedgamut-review,gamut-component-first, etc. skills) to document the new scale and rule.@skillsoft/eslint-plugin-gamut,@skillsoft/gamut,@skillsoft/gamut-agent-tools,@skillsoft/gamut-styles, and@skillsoft/variance.PR Checklist
Testing Instructions
Don't make me tap the sign.
SelectDropdownstory/docs page, open the dropdown and confirm the menu renders above surrounding content (not clipped by anyoverflow: hiddenancestor) and closes/selects correctly.Foundations/ZIndexstyleguide page and confirm the token table renders and matcheszIndexes.ts(underlaythroughtopmost).eslint-plugin-gamuttest suite (no-raw-z-index.test.ts) and confirm a rawzIndex={2}in a sample component is flagged, andzIndexes.foregroundis not.Popover/Modal/Dialogstory and confirm they still open, close, and stack correctly relative to page content after the ref fixes.PR Links and Envs