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

Put SD specific metadata in $extensions #1175

Closed
jorenbroekema opened this issue May 1, 2024 · 1 comment
Closed

Put SD specific metadata in $extensions #1175

jorenbroekema opened this issue May 1, 2024 · 1 comment
Labels
4.0 Planned for v4 major version Core Architecture This is an issue related to the core architecture of Style Dictionary

Comments

@jorenbroekema
Copy link
Collaborator

jorenbroekema commented May 1, 2024

I think we also need to have a discussion on how metadata properties should be handled in general.
According to the DTCG spec, you'd put it either in property names starting with $ prefix, or you'd put it into the $extensions under the unique namespace of your tool (e.g. style-dictionary). If I'm not mistaken, $metada props are something that belong to the token authors territory, and $extensions is where tools can put their stuff, so I'm leaning towards refactoring everything to scope and read metadata from that $extensions['com.styledictionary'] namespace

Originally posted by @jorenbroekema in #1007 (comment)

@jorenbroekema jorenbroekema added Core Architecture This is an issue related to the core architecture of Style Dictionary 4.0 Planned for v4 major version labels May 1, 2024
@jorenbroekema
Copy link
Collaborator Author

In hindsight, this isn't a priority since we only add metadata internally in the dictionary object on the token level (path, filePath and so on), and on the token level the list of properties is either known or using $ prefixes if user is adding more props, as opposed to in token group level where you can have any property key to indicate a nested token group or token. So there shouldn't be any issues with property collisions.

@jorenbroekema jorenbroekema closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 Planned for v4 major version Core Architecture This is an issue related to the core architecture of Style Dictionary
Projects
None yet
Development

No branches or pull requests

1 participant