-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
fix aliased variables being emmited twice #289
Conversation
Hey @MonsieurMan this makes sense. Could you explain a way to test this to me? How to I reproduce the issue with |
Pull Request Test Coverage Report for Build 6722612248
💛 - Coveralls |
I'm having a similar issue. And I'm not sure if it's related to #293 where the last theme seems to be being the default mode for aliased tokens. I think I can write a new test file under tests/ folder |
@JackHowa this would be great. All we need is a way to test this and than we can merge it. |
Cool, working on it now with
|
This works as expected for me locally. I will work on trying to unit test extractTokens. But will involve mocking figma's api |
@lukasoppermann @MonsieurMan thanks for your work on this and patience. I have added some tests in a separate pr off the default that shows the alias modes emitting two values to show https://github.com/lukasoppermann/design-tokens/pull/299/files#diff-18b59c301a30dbea8cef574b8e83d81e812fa126a021df0860ff518f3dd21035R17 I'm happy to make a pr off of this branch if that's helpful. Like I said before, this is working for our usecase! Thanks! |
@JackHowa can you please resolve conflicts? I think you know better what is correct. |
sorry, this isn't my pr. looks like my pr was just merged! #300 🥳 Thanks so much @lukasoppermann !! |
@JackHowa sorry, I completely missed this the whole time. 🤦 |
hahah no worries at all. thanks for the quick replies. your plugin is a lifesaver for my org |
Hi there, this is just a quick fix for a bug I had.
Aliased tokens with different modes were emitted twice (with two modes) as there were two place in the code where modes were taken into account.
This removes the loop in the
processAliasModes
fn, just keeping L98 which is already looping over modes.I didn't tested it with more than two modes for now.
Thanks for the plugin, I'm doing research for implementing a multi-brand design system and I'll maybe use it, could contribute more if it is the case and you're open to it.