feat(generate-design-tokens): support community skins generation#1663
Draft
brtbrt wants to merge 2 commits into
Draft
feat(generate-design-tokens): support community skins generation#1663brtbrt wants to merge 2 commits into
brtbrt wants to merge 2 commits into
Conversation
Enable generate-design-tokens to discover and generate community skins from JSON tokens in the mistica-design repo. Community skin tokens are expected in tokens/community/ folder, with generated files output to src/community/skins/ and css/community/ directories. - Add community skins folder paths (src/community/skins, css/community) - Modify generateSkinSrc to handle community skins with correct import paths and type usage - Add generateCommunitySkins function to discover and process community token files - Community skins use generic Skin type instead of KnownSkin - Constants are defined inline in community skin files
|
Size stats
|
|
Deploy preview for mistica-web ready!
Deployed with vercel-action |
|
Accessibility report ℹ️ You can run this locally by executing |
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.
Summary
Enable
generate-design-tokensscript to automatically discover and generate community skins from JSON tokens in the mistica-design repository.This resolves issue #1588 and allows community skin definitions (like cyber skin) to be generated from design tokens instead of being manually maintained.
Changes
Core Implementation
tokens/community/foldersrc/community/skins/{name}-skin.tsxcss/community/{name}.cssKey Features
.jsonfiles in community tokens folderSkintype (notKnownSkin)css/community/Files Changed
packages/generate-design-tokens/index.jsCOMMUNITY_SKINS_FOLDERandCOMMUNITY_CSS_FOLDERpathsgenerateSkinSrc()withisCommunitySkinparametergenerateCommunitySkins()functiongenerateSkinFiles()to call community skin generationpackages/generate-design-tokens/README.mdTechnical Details
Generation Pattern
tokens/community/cyber.json(from mistica-design repo)src/community/skins/cyber-skin.tsxcss/community/cyber.cssType System
Community skins maintain compatibility with existing type system by using the generic
Skintype instead ofKnownSkin. No type system changes needed.Testing
The implementation:
Related Issues
Fixes #1588