-
Notifications
You must be signed in to change notification settings - Fork 50
[Project Solar / Phase 1 / Engineering Follow-ups] Fix logic to extract Carbon animation easing tokens #3398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: project-solar/phase-1-main-feature-branch
Are you sure you want to change the base?
Conversation
…mat to use always seconds
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR standardizes the format of Carbon motion tokens to align with DTCG (Design Tokens Community Group) specifications. The changes ensure consistent representation of animation easing functions and durations across the design system.
Key changes:
- Converted cubic-bezier type from
cubic-beziertocubicBezierand transformed values from CSS function format to array format - Standardized all duration values to use seconds instead of milliseconds
- Re-extracted Carbon tokens with the updated conversion logic
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/tokens/src/carbon-extracted/motion/easings.json | Updated easing token types and values to DTCG-compliant format |
| packages/tokens/src/carbon-extracted/motion/durations.json | Converted duration values from milliseconds to seconds |
| packages/tokens/scripts/extract-carbon-parts/convertObjectToDtcgFormat.ts | Added conversion logic for cubic-bezier and duration standardization |
packages/tokens/scripts/extract-carbon-parts/convertObjectToDtcgFormat.ts
Show resolved
Hide resolved
|
|
||
| function convertCubicBezierValue(value: string) { | ||
| // eg. `cubic-bezier(0.2, 0, 0.38, 0.9)` | ||
| const match = value.match(/^cubic-bezier\((.*)\)$/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit broad in what it matches in the parenthesis, but I don't know if that's a real concern.
KristinLBradley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I just added one minor question.
📌 Summary
Small PR that fixes some format inconsistencies for the "motion" Carbon tokens
🛠️ Detailed description
In this PR I have:
cubic-beziervalue to the expected DTCG formatsrcfiles🔗 External links
Jira ticket: https://hashicorp.atlassian.net/browse/HDS-5671
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.