Skip to content

feat(motion): add Pine-internal motion token scaffold#740

Merged
QuintonJason merged 3 commits into
docs/foundationsfrom
feat/motion-tokens
May 29, 2026
Merged

feat(motion): add Pine-internal motion token scaffold#740
QuintonJason merged 3 commits into
docs/foundationsfrom
feat/motion-tokens

Conversation

@QuintonJason

@QuintonJason QuintonJason commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

Closes the gap that Guides/Motion explicitly flags ("Pine does not yet expose a dedicated motion token scale"). This PR ships a small Pine-internal motion token set so component SCSS has a named vocabulary for transitions instead of magic numbers.

What's new

  • libs/core/src/global/styles/_motion.scss — CSS custom properties at :root:
    • --pine-motion-duration-fast (120ms), -base (200ms), -slow (300ms)
    • --pine-motion-easing-out, -in, -in-out curves
    • prefers-reduced-motion: reduce collapses the durations to 0ms so consumer components inherit the override automatically.
  • libs/core/src/global/styles/app.scss@use 'motion'; so the tokens load alongside the existing font setup.
  • libs/core/src/stories/guides/motion.docs.mdx — replaces the "no tokens yet" disclaimer with a documented Tokens section (durations + easing tables, reduced-motion note, and a Roadmap callout about the upstream consolidation).

Why Pine-internal

The ADR for externalized tokens (#1 in #733) routes design tokens through @kajabi-ui/styles. Motion tokens are not there yet. This PR is the scaffold: same CSS variable names that will become canonical when the upstream package adds motion. Component SCSS that adopts var(--pine-motion-...) today swaps source-of-truth without a rename when upstream ships.

What's not in this PR

  • Component migrations. Adopting var(--pine-motion-...) across pds-modal / pds-popover / pds-tooltip / pds-accordion / pds-dropdown-menu is the follow-up.
  • A lint rule. Once a critical mass of components is migrated, add a Pine Stylelint rule that flags raw transition: ... <ms> literals.

Dependency note

Based on docs/foundations (#736) because the Guides/Motion doc that this updates is introduced there. Merge that first, then rebase this on main.

Closes a Level-3 "Motion guidelines" gap on the maturity scorecard (the guide existed but its central recommendation — use tokens — was unactionable).

Fixes #(no-issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Verified Stylelint passes on the new _motion.scss.

  • Confirmed the @use import resolves cleanly (the existing fonts module follows the same pattern).

  • Verified the prefers-reduced-motion media query collapses durations to 0ms (browser devtools).

  • unit tests

  • e2e tests

  • accessibility tests (prefers-reduced-motion is honored at the token level)

  • tested manually

  • other:

Test Configuration:

  • Pine versions: 3.25.1 (current main)
  • OS: macOS 25.3.0
  • Browsers: Chrome / Safari with prefers-reduced-motion toggle
  • Screen readers: n/a
  • Misc: tokens-only addition

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

Follow-ups

  • Migrate pds-modal, pds-popover, pds-tooltip, pds-accordion, pds-dropdown-menu SCSS to use the new tokens.
  • Add a pine-design-system/prefer-motion-tokens Stylelint rule alongside the existing color rules.
  • Coordinate with ds-tokens maintainers on consolidating motion into @kajabi-ui/styles (ADR-0001 supersession path).

cc @Kajabi/dss-devs


Note

Low Risk
Non-breaking CSS token additions and a single modal transition swap; no auth, data, or API surface changes.

Overview
Introduces Pine-internal motion tokens (--pine-motion-duration-*, --pine-motion-easing-*) in _motion.scss, loaded globally via app.scss, with duration tokens zeroed under prefers-reduced-motion: reduce.

Guides/Motion is updated from “no tokens yet” to document the token tables, reduced-motion behavior, and upstream consolidation roadmap.

pds-modal backdrop open/close transitions now use the tokens (ease-in on exit, ease-out when .open) instead of hardcoded 0.2s ease.

Reviewed by Cursor Bugbot for commit de76005. 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 May 15, 2026
Comment thread libs/core/src/components/pds-modal/pds-modal.scss Outdated

@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.

There are 2 total unresolved issues (including 1 from previous review).

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 03769df. Configure here.

Comment thread libs/core/src/components/pds-modal/pds-modal.scss Outdated
Add libs/core/src/global/styles/_motion.scss exposing duration and
easing CSS custom properties (--pine-motion-duration-{fast,base,slow}
and --pine-motion-easing-{out,in,in-out}). Wired into app.scss so the
tokens land in the global stylesheet alongside fonts.

Durations collapse to 0ms under prefers-reduced-motion so consumer
components inherit the override without per-component media queries.

Update the Guides/Motion doc to remove the no-tokens disclaimer,
document the new tokens with usage tables, and call out the upstream
follow-up to consolidate into @kajabi-ui/styles.
Address review feedback on the motion-tokens PR:

- Strengthen the namespace contract comment in _motion.scss to make
  clear Pine is claiming the upstream-canonical names and that the
  file is to be removed when @kajabi-ui/styles publishes motion.
- Migrate pds-modal __backdrop transition from raw 0.2s ease to
  var(--pine-motion-duration-base) var(--pine-motion-easing-out) so
  the new tokens have at least one production consumer.
- Document the reduced-motion limitation (override applies to
  duration only; JS-driven animations need their own matchMedia check).
@QuintonJason QuintonJason self-assigned this May 29, 2026
@QuintonJason QuintonJason requested a review from pixelflips May 29, 2026 21:07

@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.

🔥 Nice addition! LGTM! 👍🏼

@QuintonJason QuintonJason merged commit a1e3b01 into docs/foundations May 29, 2026
17 checks passed
@QuintonJason QuintonJason deleted the feat/motion-tokens branch May 29, 2026 21:27
QuintonJason added a commit that referenced this pull request Jun 1, 2026
* feat(motion): add Pine-internal motion token scaffold

Add libs/core/src/global/styles/_motion.scss exposing duration and
easing CSS custom properties (--pine-motion-duration-{fast,base,slow}
and --pine-motion-easing-{out,in,in-out}). Wired into app.scss so the
tokens land in the global stylesheet alongside fonts.

Durations collapse to 0ms under prefers-reduced-motion so consumer
components inherit the override without per-component media queries.

Update the Guides/Motion doc to remove the no-tokens disclaimer,
document the new tokens with usage tables, and call out the upstream
follow-up to consolidate into @kajabi-ui/styles.

* feat(motion): strengthen contract comment, migrate pds-modal backdrop

Address review feedback on the motion-tokens PR:

- Strengthen the namespace contract comment in _motion.scss to make
  clear Pine is claiming the upstream-canonical names and that the
  file is to be removed when @kajabi-ui/styles publishes motion.
- Migrate pds-modal __backdrop transition from raw 0.2s ease to
  var(--pine-motion-duration-base) var(--pine-motion-easing-out) so
  the new tokens have at least one production consumer.
- Document the reduced-motion limitation (override applies to
  duration only; JS-driven animations need their own matchMedia check).

* style(pds-modal): use ease-in on backdrop exit, ease-out on enter
QuintonJason added a commit that referenced this pull request Jun 2, 2026
… docs (#736)

* docs(foundations): add motion, RTL, status, and Code Connect coverage docs

Land four cross-cutting documents that close several gaps in the Pine
design-system maturity map:

- Guides/Motion — principles and implementation hints for component
  animation; flags the absence of dedicated motion tokens.
- Guides/RTL and localization — assumptions teams should make today
  plus an audit checklist with every Pine component.
- Resources/Component status — central Stable/Beta/Deprecated table
  covering all 35 Pine components.
- libs/figma/CODE_CONNECT_COVERAGE.md — tracks which Pine components
  have a matching Code Connect mapping.

Also cross-link the new Component status and RTL pages from the
Support docs page.

* fix: use logical CSS for RTL layout gaps and simplify RTL guide

Replace physical left/right with inset-inline properties in combobox,
input, table sticky cells, tooltip arrows, and scroll shadows. Make
table scroll-shadow visibility respect RTL scroll positions. Remove
the per-component audit checklist from the RTL guide.

* docs: defer Storybook RTL toolbar copy to PR 739

* fix(pds-table): address RTL scroll and tooltip arrow feedback

Add shared scroll utils with cross-browser RTL scrollLeft detection.
Use them for table shadows and fixed-column has-scrolled state. Revert
tooltip arrow positioning to physical left/right to match Floating UI
placement classes.

* fix(pds-table): correct RTL scroll offset and shadow gradients

Fix swapped default/reverse RTL scrollLeft normalization, add scrollable
content to the browser probe, use valid gradient directions with RTL
overrides, and expand scroll utility tests.

* feat(storybook): add LTR/RTL preview toggle and audit pointer (#739)

* feat(storybook): add LTR/RTL preview toggle and audit pointer

Add a Direction global type with an LTR/RTL toolbar control. The
withDirection decorator applies dir on documentElement and body for
the active story (and the parent docs frame), matching the consumer
contract for RTL surfaces.

Update the RTL and localization guide with a How to audit section
pointing teams at the toggle. The audit checklist stays intentionally
unchecked; rows should be marked off in the PR that proves behavior.

* fix(storybook): use direction icon for RTL toolbar

* fix(storybook): scope RTL dir to preview iframe only

* fix(storybook): use valid transfer icon for direction toolbar

* docs(storybook): update RTL guide cross-reference in preview

* feat(motion): add Pine-internal motion token scaffold (#740)

* feat(motion): add Pine-internal motion token scaffold

Add libs/core/src/global/styles/_motion.scss exposing duration and
easing CSS custom properties (--pine-motion-duration-{fast,base,slow}
and --pine-motion-easing-{out,in,in-out}). Wired into app.scss so the
tokens land in the global stylesheet alongside fonts.

Durations collapse to 0ms under prefers-reduced-motion so consumer
components inherit the override without per-component media queries.

Update the Guides/Motion doc to remove the no-tokens disclaimer,
document the new tokens with usage tables, and call out the upstream
follow-up to consolidate into @kajabi-ui/styles.

* feat(motion): strengthen contract comment, migrate pds-modal backdrop

Address review feedback on the motion-tokens PR:

- Strengthen the namespace contract comment in _motion.scss to make
  clear Pine is claiming the upstream-canonical names and that the
  file is to be removed when @kajabi-ui/styles publishes motion.
- Migrate pds-modal __backdrop transition from raw 0.2s ease to
  var(--pine-motion-duration-base) var(--pine-motion-easing-out) so
  the new tokens have at least one production consumer.
- Document the reduced-motion limitation (override applies to
  duration only; JS-driven animations need their own matchMedia check).

* style(pds-modal): use ease-in on backdrop exit, ease-out on enter

* fix(pds-table): flip fixed-column shadow offset in RTL

* fix: address RTL review feedback for form controls and tooltip

Correct checkbox checkmark mirroring, switch knob positioning, filter
popover anchor placement, input addon select radii, select disabled icon
dimming, and tooltip html-content arrow alignment under dir=rtl.

* fix: resolve select radius and filter RTL direction bot feedback

Drop the border-radius shorthand that reset per-corner overrides on
pds-select, and detect RTL via computed direction on the filter host
instead of documentElement.dir only.

* fix(pds-filter): use trigger right edge for RTL overflow check

Popover anchors at inline-start (trigger right in RTL), so inline-end
overflow must measure from triggerRect.right not left.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants