Conversation
4e41fd8 to
f8af5d4
Compare
4e0ae77 to
421e7b3
Compare
chriddell
reviewed
Jun 26, 2024
Member
chriddell
left a comment
There was a problem hiding this comment.
What's the reasoning for maintaining different products (themes) in this repo?
I would have thought that is best implemented within each individual product, as it seems to add a lot of (in my opinion, unnecessary) complexity to the design system...
Member
Author
|
I agree that handling themes (products) adds more complexity to the codebase. But, I thought it would be a good idea to provide all the core and semantic tokens available for each team. Each team would then handle the component-level tokens. We should definitely have a chat about that. I'll send a message in the Slack channel today. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
The flow is as follows:
tokens.jsonfile is updated.tokens.jsonfile is split into smaller files based on the keys.$themes.jsonfile is added by the developer and will need to be updated if any new products are added to Tokens Studio.Since we are on a free plan, we have to simulate "theming". If we were on a paid version, the tokens.json would have $themes values sent to us from Figma. But, since we don't have that, we need to create it. This PR does't handle the mobile, tablet, and desktop JSON files yet.
core, semantic, and all of the products.FIle structure explained:
tokens.json: our main file used to store and send tokens between GitHub and Figma.tokens: a folder where we store tokens from Figma, but we have split them into smaller JSON files by runningnpm run split-json.tokens/$themes.json: the only file not generated from tokens.json. It is added by the developer and simulates Figma theming.generatedTokens: a folder to store all the variables generated by Style Dictionary.