Repository navigation
feat(theme): motion token primitives — duration, easing, and component migration - #684
Merged
Merged
Conversation
…t migration
Introduces a layered motion token system replacing the old bundled
transition tokens (--transition-fast/--transition-normal).
New token layers:
- Duration primitives: --duration-{fast,medium}{-min,-max}
- Easing primitives: --easing-{decelerate,standard}
- Old transition tokens kept as deprecated aliases
Component migration (35 files):
- 24 components: transitionVars → durationVars + easingVars
- 6 hardcoded components: inline values → token vars
(HoverCard, Popover, Tooltip, TopNavMegaMenu, MobileNav, Collapsible)
- ThemeEditor story updated with new token groups
Token mapping:
- Micro-interactions (hover, toggle): --duration-fast + --easing-standard
- Enter/exit animations (dialog, drawer): --duration-medium + --easing-decelerate
- Tooltip (near-instant): --duration-fast-min + --easing-decelerate
- MobileNav (slide): --duration-medium + --easing-standard
Closes #674 (partial — motionScale config in follow-up PR)
Co-authored-by: Navi <[email protected]>
…oken usage The bulk migration script incorrectly transformed string-interpolated transitionVars into (durationVars, easingVars['--transition-fast']), creating a comma operator expression. Fixed to use separate transitionProperty/transitionDuration/transitionTimingFunction. Co-authored-by: Navi <[email protected]>
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsButton · View in Storybook
Calendar · View in Storybook
CheckboxInput · View in Storybook
Collapsible · View in Storybook
Dialog · View in Storybook
DropdownMenu · View in Storybook
Field · View in Storybook
HoverCard · View in Storybook
Link · View in Storybook
List · View in Storybook
MobileNav · View in Storybook
MoreMenu · View in Storybook
Pagination · View in Storybook
Popover · View in Storybook
ProgressBar · View in Storybook
RadioList · View in Storybook
Selector · View in Storybook
SideNav · View in Storybook
Slider · View in Storybook
Switch · View in Storybook
TabList · View in Storybook
Table · View in Storybook
Token · View in Storybook
Tooltip · View in Storybook
TopNav · View in Storybook
TreeList · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 6 accessibility violation(s) found — 1 critical, 3 serious, 2 moderate. XDSCalendar - 1 issue(s)
XDSList - 1 issue(s)
XDSPagination - 1 issue(s)
XDSSideNav - 1 issue(s)
XDSTabList - 1 issue(s)
XDSToken - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Per Ted's feedback: consolidate to one easing curve. The decelerate curve (cubic-bezier(0.24, 1, 0.4, 1)) becomes --easing-standard — it's the better general-purpose default. Removes --easing-standard (the old symmetric 0.4,0,0.2,1 curve). All components now use a single --easing-standard token. Co-authored-by: Navi <[email protected]>
This was referenced Mar 19, 2026
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
…t migration (#684) * feat(theme): motion token primitives — duration, easing, and component migration Introduces a layered motion token system replacing the old bundled transition tokens (--transition-fast/--transition-normal). New token layers: - Duration primitives: --duration-{fast,medium}{-min,-max} - Easing primitives: --easing-{decelerate,standard} - Old transition tokens kept as deprecated aliases Component migration (35 files): - 24 components: transitionVars → durationVars + easingVars - 6 hardcoded components: inline values → token vars (HoverCard, Popover, Tooltip, TopNavMegaMenu, MobileNav, Collapsible) - ThemeEditor story updated with new token groups Token mapping: - Micro-interactions (hover, toggle): --duration-fast + --easing-standard - Enter/exit animations (dialog, drawer): --duration-medium + --easing-decelerate - Tooltip (near-instant): --duration-fast-min + --easing-decelerate - MobileNav (slide): --duration-medium + --easing-standard Closes #674 (partial — motionScale config in follow-up PR) Co-authored-by: Navi <[email protected]> * fix(Selector): replace broken comma-operator transition with proper token usage The bulk migration script incorrectly transformed string-interpolated transitionVars into (durationVars, easingVars['--transition-fast']), creating a comma operator expression. Fixed to use separate transitionProperty/transitionDuration/transitionTimingFunction. Co-authored-by: Navi <[email protected]> * refactor(theme): single easing token — rename decelerate to standard Per Ted's feedback: consolidate to one easing curve. The decelerate curve (cubic-bezier(0.24, 1, 0.4, 1)) becomes --easing-standard — it's the better general-purpose default. Removes --easing-standard (the old symmetric 0.4,0,0.2,1 curve). All components now use a single --easing-standard token. Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
…t migration (#684) * feat(theme): motion token primitives — duration, easing, and component migration Introduces a layered motion token system replacing the old bundled transition tokens (--transition-fast/--transition-normal). New token layers: - Duration primitives: --duration-{fast,medium}{-min,-max} - Easing primitives: --easing-{decelerate,standard} - Old transition tokens kept as deprecated aliases Component migration (35 files): - 24 components: transitionVars → durationVars + easingVars - 6 hardcoded components: inline values → token vars (HoverCard, Popover, Tooltip, TopNavMegaMenu, MobileNav, Collapsible) - ThemeEditor story updated with new token groups Token mapping: - Micro-interactions (hover, toggle): --duration-fast + --easing-standard - Enter/exit animations (dialog, drawer): --duration-medium + --easing-decelerate - Tooltip (near-instant): --duration-fast-min + --easing-decelerate - MobileNav (slide): --duration-medium + --easing-standard Closes #674 (partial — motionScale config in follow-up PR) Co-authored-by: Navi <[email protected]> * fix(Selector): replace broken comma-operator transition with proper token usage The bulk migration script incorrectly transformed string-interpolated transitionVars into (durationVars, easingVars['--transition-fast']), creating a comma operator expression. Fixed to use separate transitionProperty/transitionDuration/transitionTimingFunction. Co-authored-by: Navi <[email protected]> * refactor(theme): single easing token — rename decelerate to standard Per Ted's feedback: consolidate to one easing curve. The decelerate curve (cubic-bezier(0.24, 1, 0.4, 1)) becomes --easing-standard — it's the better general-purpose default. Removes --easing-standard (the old symmetric 0.4,0,0.2,1 curve). All components now use a single --easing-standard token. Co-authored-by: Navi <[email protected]> --------- Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
…t migration (#684) * feat(theme): motion token primitives — duration, easing, and component migration Introduces a layered motion token system replacing the old bundled transition tokens (--transition-fast/--transition-normal). New token layers: - Duration primitives: --duration-{fast,medium}{-min,-max} - Easing primitives: --easing-{decelerate,standard} - Old transition tokens kept as deprecated aliases Component migration (35 files): - 24 components: transitionVars → durationVars + easingVars - 6 hardcoded components: inline values → token vars (HoverCard, Popover, Tooltip, TopNavMegaMenu, MobileNav, Collapsible) - ThemeEditor story updated with new token groups Token mapping: - Micro-interactions (hover, toggle): --duration-fast + --easing-standard - Enter/exit animations (dialog, drawer): --duration-medium + --easing-decelerate - Tooltip (near-instant): --duration-fast-min + --easing-decelerate - MobileNav (slide): --duration-medium + --easing-standard Closes #674 (partial — motionScale config in follow-up PR) * fix(Selector): replace broken comma-operator transition with proper token usage The bulk migration script incorrectly transformed string-interpolated transitionVars into (durationVars, easingVars['--transition-fast']), creating a comma operator expression. Fixed to use separate transitionProperty/transitionDuration/transitionTimingFunction. * refactor(theme): single easing token — rename decelerate to standard Per Ted's feedback: consolidate to one easing curve. The decelerate curve (cubic-bezier(0.24, 1, 0.4, 1)) becomes --easing-standard — it's the better general-purpose default. Removes --easing-standard (the old symmetric 0.4,0,0.2,1 curve). All components now use a single --easing-standard token. ---------
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
Introduces a layered motion token system per the architecture proposed in #674. Replaces the old bundled
--transition-fast/--transition-normaltokens with separated duration and easing primitives.New Token Layers
Duration Primitives
--duration-fast-min130ms--duration-fast175ms--duration-fast-max230ms--duration-medium-min310ms--duration-medium410ms--duration-medium-max550msEasing Primitives
--easing-deceleratecubic-bezier(0.24, 1, 0.4, 1)--easing-standardcubic-bezier(0.4, 0, 0.2, 1)Migration
transitionVars: mechanical migration todurationVars+easingVarstransitionDefaults/transitionVarskept as deprecated aliases for backward compatToken mapping decisions
--duration-fast+--easing-standard--duration-medium+--easing-decelerate--duration-fast-min+--easing-decelerate--duration-medium+--easing-standard--duration-medium-min+--easing-decelerateWhat's NOT in this PR
motionScaleconfig fordefineTheme()— that's the follow-up PR where themes can setmotionScale: { fast, medium, ratio }to compute the full 6-token duration scale from 3 values.Refs #674