Skip to content

style: adopt pine motion duration tokens for component transitions#755

Merged
QuintonJason merged 2 commits into
mainfrom
style/adopt-motion-tokens
Jun 3, 2026
Merged

style: adopt pine motion duration tokens for component transitions#755
QuintonJason merged 2 commits into
mainfrom
style/adopt-motion-tokens

Conversation

@QuintonJason

@QuintonJason QuintonJason commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Implementation-plan item #3 (part 1 of 2): adopt the --pine-motion-* duration tokens (introduced in #736) across component transitions, so they inherit the prefers-reduced-motion override automatically.

Behavior-preserving by design. Only values with an exact token match are migrated:

  • 0.2svar(--pine-motion-duration-base) (radio, input, combobox, multiselect, filter)
  • toast entrance/exit: 0.3svar(--pine-motion-duration-slow), cubic-bezier(0.4, 0, 0.2, 1)var(--pine-motion-easing-in-out) (exact)

Easing keywords (ease, ease-out) are intentionally left as-is: they are not equal to the token curves (ease = cubic-bezier(0.25,0.1,0.25,1)easing-in-out), so swapping them would change motion. Off-grid durations (0.15s, 0.1s) and bespoke keyframe animations (loader/progress spinners, toast spinner/dash) are deliberately untouched — they have no exact token and aren't interaction transitions.

The reduced-motion win still lands: tokenized durations collapse to 0ms under prefers-reduced-motion.

Stacked on #736 (docs/foundations), which defines _motion.scss / the --pine-motion-* tokens. Merge #736 first; this retargets to main. Part 2 (a pine-design-system/no-hardcoded-motion stylelint rule) follows in a separate PR.

New dependencies: none.

Fixes #(no-issue)

Type of change

  • This change requires a documentation update
  • Other: token adoption / SCSS-only, behavior-preserving

How Has This Been Tested?

  • stylelint passes on all six changed SCSS files.

  • Mirrors the existing pds-modal token usage shipped in docs(foundations): add motion, RTL, status, and Code Connect coverage docs #736 (same :root tokens, which pierce shadow DOM).

  • Durations are exact 1:1 substitutions (0.2s = 200ms = base, 0.3s = 300ms = slow); no perceptible change at default motion, and transitions collapse under reduced-motion.

  • unit tests

  • e2e tests

  • accessibility tests

  • tested manually

  • other: stylelint + exact-value review

Test Configuration:

  • Pine versions: 3.26.x (docs/foundations)
  • OS: macOS 25.3.0
  • Misc: SCSS-only

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Design has QA'ed and approved this PR

Note

Low Risk
SCSS token swaps are 1:1 duration replacements; toast dismiss logic is slightly more complex but covered by an added reduced-motion test.

Overview
Replaces hardcoded 0.2s transition durations with var(--pine-motion-duration-base) on combobox, filter, input, multiselect, and radio image borders so those interactions pick up global prefers-reduced-motion handling from Pine motion tokens. ease easing is unchanged where it was already used.

pds-toast maps entrance/exit timing to --pine-motion-duration-slow and --pine-motion-easing-in-out, and dismiss() no longer uses a fixed 300ms wait: it reads computed --animation-duration, skips the delay when prefers-reduced-motion: reduce, with a 300ms fallback. A unit test covers the reduced-motion dismiss path.

Reviewed by Cursor Bugbot for commit c0ffd3c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the package: core Changes have been made to the Core package label Jun 1, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f348213. Configure here.

Comment thread libs/core/src/components/pds-toast/pds-toast.scss
@QuintonJason QuintonJason added the ran-gauntlet Multi-agent review gauntlet has been run on this branch label Jun 1, 2026
Base automatically changed from docs/foundations to main June 2, 2026 19:25
@QuintonJason QuintonJason force-pushed the style/adopt-motion-tokens branch from f348213 to c02baf7 Compare June 3, 2026 13:21
@netlify

netlify Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy Preview for pine-design-system ready!

Name Link
🔨 Latest commit c0ffd3c
🔍 Latest deploy log https://app.netlify.com/projects/pine-design-system/deploys/6a202dc51832ca0008f0e6f0
😎 Deploy Preview https://deploy-preview-755--pine-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@QuintonJason QuintonJason self-assigned this Jun 3, 2026
@QuintonJason QuintonJason requested a review from pixelflips June 3, 2026 16:39

@pixelflips pixelflips left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev qa'd each component and LGTM! 👍🏼

@QuintonJason QuintonJason merged commit 6bbd532 into main Jun 3, 2026
21 checks passed
@QuintonJason QuintonJason deleted the style/adopt-motion-tokens branch June 3, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core Changes have been made to the Core package ran-gauntlet Multi-agent review gauntlet has been run on this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants