Skip to content
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

Using SD prefix instead of adding it to the tokens json file #727

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

lukasoppermann
Copy link
Contributor

@lukasoppermann lukasoppermann commented Sep 3, 2024

Summary

This pr replaces the use of a custom namespace implantation that requires token files to have the name space in them with the out of the box style dictionary prefix. This allows us to use a lot of upstream files instead of duplicating them just to add a namespace.

Copy link

changeset-bot bot commented Sep 3, 2024

⚠️ No Changeset found

Latest commit: 6810b1e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 3, 2024

🔍 Design token changes found

View CSS variable changes
+ --brand-controlStack-large-gap-spacious: var(--base-size-12);
+ --brand-controlStack-large-gap-condensed: var(--base-size-8);
+ --brand-controlStack-large-gap-auto: var(--base-size-8);
+ --brand-controlStack-medium-gap-spacious: var(--base-size-12);
+ --brand-controlStack-medium-gap-condensed: var(--base-size-8);
+ --brand-controlStack-small-gap-spacious: var(--base-size-16);
+ --brand-controlStack-small-gap-condensed: var(--base-size-8);

Copy link
Contributor

github-actions bot commented Sep 3, 2024

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@lukasoppermann
Copy link
Contributor Author

lukasoppermann commented Sep 4, 2024

It seems to not be possible with SD to have a prefix for the source tokens but not for the included ones. At least not without a custom format.

@rezrah do we need output references or could we output hex values?

@lukasoppermann
Copy link
Contributor Author

As expected docs are broken without reworking the color scale, after replacing js modules with commonjs:

CleanShot 2024-09-12 at 12 52 48@2x

@lukasoppermann lukasoppermann force-pushed the @lukasoppermann/design-token-prefix branch 5 times, most recently from 9283b21 to c3157d0 Compare September 12, 2024 11:34
@lukasoppermann
Copy link
Contributor Author

With a slightly hacky transformer it is now working. We will need to remove this later: https://primer-5bb7c18307-26139705.drafts.github.io/brand/primitives/color

@lukasoppermann lukasoppermann force-pushed the @lukasoppermann/design-token-prefix branch from c3157d0 to 8fbe30b Compare September 16, 2024 06:43
Copy link
Contributor

@danielguillan danielguillan left a comment

Choose a reason for hiding this comment

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

Looking good! I didn't find any broken or missing tokens. VRT shows no diff either. 🎉

@lukasoppermann lukasoppermann merged commit fd881db into main Sep 16, 2024
19 checks passed
@lukasoppermann lukasoppermann deleted the @lukasoppermann/design-token-prefix branch September 16, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants