-
Notifications
You must be signed in to change notification settings - Fork 55
Transition tokens transformer #1213
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
Conversation
|
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 adds transformation logic for transition tokens by introducing a new transform function to convert transition tokens into corresponding CSS strings.
- Added a new transform (transitionToCss) and accompanying tests
- Updated schemas, filters, and platform registration to support transition tokens
- Included tests for both valid and invalid token cases
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/transformers/transitionToCss.ts | New transformer converting transition tokens to CSS transition strings |
src/transformers/transitionToCss.test.ts | Tests covering transformation logic including edge cases |
src/transformers/index.ts | Exported the new transitionToCss transform |
src/test-utilities/getMockToken.ts | Updated type annotation for getMockToken |
src/schemas/validTokenType.ts | Added 'transition' as a valid token type |
src/schemas/transitionTokenSchema.test.ts | Schema tests for transition tokens |
src/schemas/transitionToken.ts | Defined the transition token schema |
src/schemas/designToken.ts | Included transitionToken in design token registry |
src/primerStyleDictionary.ts | Registered transitionToCss transform |
src/platforms/css.ts | Added CSS application for the new transition transform |
src/filters/isTransition.ts | Defined filter to detect transition tokens |
src/filters/isTransition.test.ts | Unit tests for transition token filter |
src/filters/index.ts | Exported the new isTransition filter |
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 introduces transformation logic to convert transition tokens into CSS transition strings. Key changes include:
- Adding a new transformer (transitionToCss) for handling transition tokens.
- Updating token schemas and tests to support the new transition token type.
- Registering the new transition transform in both the Style Dictionary and CSS platform.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/transformers/transitionToCss.ts | Implements transformation to generate CSS transition strings |
src/transformers/transitionToCss.test.ts | Adds tests validating correct transformation of transition tokens |
src/transformers/index.ts | Exports the new transition transformer |
src/transformers/cubicBezierToCss.ts | Updates cubicBezier transformation to support usage by transitions |
src/test-utilities/getMockToken.ts | Enhances type-safety in the test token utility |
src/schemas/validTokenType.ts | Adds "transition" as a valid token type |
src/schemas/transitionTokenSchema.test.ts | Provides comprehensive tests for transition token validation |
src/schemas/transitionToken.ts | Defines the schema for transition tokens |
src/schemas/designToken.ts | Registers transition token within the design token schema |
src/primerStyleDictionary.ts | Registers transitionToCss transform in the Style Dictionary |
src/platforms/css.ts | Includes the transition transformation in the CSS platform build |
src/filters/isTransition.ts | Implements a filter to identify transition tokens |
src/filters/isTransition.test.ts | Adds tests to verify the correct behavior of the isTransition filter |
src/filters/index.ts | Updates exports to include the new isTransition filter |
Summary
This Pr adds transformation logic for transitions