feat(ui): SW-2016 — unify shadows on elevation tokens 0-7 with dark-mode support (https://tetrascience.atlassian.net/browse/SW-2016)#127
Open
boramyi-ts wants to merge 3 commits into
Open
Conversation
…dopt across components Re-value the elevation tokens to mirror the Tailwind default shadow scale 1:1 (2xs→1, xs→2, sm→3, md→4, lg→5, xl→6, 2xl→7), adding elevation-6 and elevation-7. Migrating a component from shadow-* to shadow-elevation-* is therefore visually a no-op in light mode. Replace all 25 production Tailwind shadow usages with the matching shadow-elevation-* utility; Dialog moves from elevation-3 (old MD3 value) to elevation-5 to keep overlay-tier weight alongside Sheet. Dark mode: same geometry with alphas tripled (.05→.15, .1→.3, .25→.5) so elevations stay legible on dark surfaces — previously only Dialog adapted; now every shadowed component does. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…t-menu, dropdown-menu, sidebar Coverage check was failing because the PR touched context-menu.tsx (42%), dropdown-menu.tsx (45%), and sidebar.tsx (94%) — all below the 95% new-code threshold. The changes in the PR were pure CSS class renames (shadow-md → shadow-elevation-4 etc.), but the coverage check measures per-file statement coverage for any changed file. Add Storybook play-function stories that render the previously-untested exported sub-components: - context-menu: WithGroup, WithSubMenu, WithCheckboxItems, WithRadioItems (covers ContextMenuGroup, ContextMenuLabel, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem) - dropdown-menu: WithLabelsAndShortcuts, WithCheckboxItems, WithRadioItems, WithSubMenu (covers DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent) - sidebar: WithShowOnHover, ControlledSidebar, KeyboardShortcutToggle (covers showOnHover branch in SidebarMenuAction, controlled open/ onOpenChange path, and the Ctrl+B keyboard shortcut handler)
auto-merge was automatically disabled
June 17, 2026 17:52
Head branch was pushed to by a user without write access
… dropdown-menu, sidebar
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.
Summary
Jira: SW-2016
Unifies the kit on the elevation token system by re-valuing
--elevation-*to mirror the Tailwind default shadow scale 1:1, extending it to levels 0–7, migrating all 25 production shadow usages toshadow-elevation-*, and adding dark-mode variants. Light mode is pixel-identical by construction (the values are the same — only the syntax changed); dark mode adaptation is the designed change.Changes
index.tailwind.css):--elevation-0…7re-valued to the Tailwind scale (shifted one slot);--elevation-6/7and their@thememappings are new. Dark variants: same geometry, alphas ×3 (·05→·15, ·10→·30, ·25→·50).shadow-xs→elevation-2(×1),sm→3(×7),md→4(×11),lg→5(×5). Zero Tailwind default shadows remain in production components.elevation-3(old MD3 value, which this PR re-values underneath it) toelevation-5, keeping overlay-tier weight alongside Sheet.Why
Previously two shadow systems coexisted: MD3 elevation tokens (dark-adaptive, 1 consumer) and Tailwind defaults (static, 24 consumers) — so in dark mode nearly every shadow effectively vanished at 10% black on dark surfaces. After this PR every shadowed component adapts, and future shadow re-designs are pure token edits with no component churn.
Before / after
Light — before:

Light — after (identical except Dialog):

Dark — before (Tailwind shadows don't adapt — shadows nearly invisible):

Dark — after (alphas ×3 — elevation legible on dark surfaces):

Testing
yarn lint/yarn typecheck✅yarn test:all✅ — 1093 tests (448 unit + 645 Storybook play)dist/index.css,shadow-elevation-2…7utilities generated, light values byte-identical to the Tailwind scale.🤖 Generated with Claude Code