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

Process references first / at the same time as transforms #208

Closed
chazzmoney opened this issue Nov 30, 2018 · 9 comments
Closed

Process references first / at the same time as transforms #208

chazzmoney opened this issue Nov 30, 2018 · 9 comments
Labels
Core Architecture This is an issue related to the core architecture of Style Dictionary
Milestone

Comments

@chazzmoney
Copy link
Collaborator

#198 (comment)
#120 (comment)

We've had a couple issues come up in regard to handling references/aliases before transforms (or at the same time). We also are looking at #205, which would require this change (depending on what we choose to do).

@chazzmoney chazzmoney added this to the 3.0 milestone Nov 30, 2018
@chazzmoney
Copy link
Collaborator Author

Adding to 3.0 as this could be considered a breaking change.

@chazzmoney chazzmoney added the Core Architecture This is an issue related to the core architecture of Style Dictionary label Nov 30, 2018
@lancetharper
Copy link

I have found this somewhat counter-intuitive when first starting out with SD. It would go a long way toward increasing flexibility of token creation if you don't follow strict CTI (me! 😄).

Loving SD but this is my biggest sticking point so far. Hope to see this land soon!

@didoo
Copy link
Contributor

didoo commented Jan 19, 2019

@lancetharper I don't know your context, your use case, and your business needs, but just know that if you want you can completely ignore the CTI structure (that's what I am doing) if you create custom transforms/transformGroups. Of course, it not out-of-the-box but trust me, I've done it, it's easier than you may think, and you have the benefits of using Style Dictionary plus the benefits of being able to customise your input and output in every detail.

If you want to know more, I've written a (long) post about my experience: https://medium.com/@didoo/how-to-manage-your-design-tokens-with-style-dictionary-98c795b938aa

@lancetharper
Copy link

@didoo Yes! I've read your article and haven't had a problem ignoring the CTI structure; I've just re-wired it to abstract it out of naming.

I just want to be able to do transforms on referenced/aliased tokens

@mhewson
Copy link

mhewson commented Feb 22, 2019

as an example, It would be great maintain alpha channel values separate from foundational color tokens and combine these underlaying values into tokens

@shaunbent
Copy link

I have just ran into this problem by trying to exactly what @mhewson is describing above.

Do you have a clear plan of what you intend to implement @chazzmoney? I'd be happy to try and help out with this if I can find sometime.

@chazzmoney
Copy link
Collaborator Author

@shaunbent thanks for bringing this back up, I think this is actually something we need to think about soon.

I don't have a clear plan. The way SD works is pretty step by step currently; I think there would be some heavy changes involved (and likely breaking) to get everything to run in a new order or all at the same time.

If you find some time, i would LOVE to see someone outside take a stab at it (diversity of thinking results in better solutions). I'm happy to answer any questions as they come up!

@mfal
Copy link
Contributor

mfal commented Jan 13, 2020

I really like the idea of creating new tokens from other tokens by transforms (like color transformation e.g. with polished).

@chazzmoney #371 enabels this feature and now is ready to be reviewed!

@chazzmoney
Copy link
Collaborator Author

chazzmoney commented May 25, 2021

Just wanted to put a huge acknowledgment of @mfal

Your diverse thinking and hard work created a more flexible (and better) solution. Your contribution solved a variety of issues people were running into trying to have SD work for their use cases. You moved SD forward in a really significant way that will impact the ease of managing styles in code.

THANK YOU! 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Architecture This is an issue related to the core architecture of Style Dictionary
Projects
None yet
Development

No branches or pull requests

6 participants