-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Broken color variable references #3212
Comments
@danielius-tvarijonas, could you perhaps share the steps to reproduce this? I have heard this issue before where the variables are only relinked on the 2nd export. |
@keeganedwin It happens randomly when exporting variables from the themes (as shown in the attached screenshot) using the standard method without any additional steps. |
@keeganedwin I think I found what was causing the issue. After removing the lines related to token attachment to variables and styles, as well as the collection and mode IDs, all the variables are now being exported correctly on the first attempt. However, I noticed that after the variables are exported, the plugin indicates there are new theme configuration changes that can be pushed to the GitHub repo. When I check the themes, all the token attachments to variables and styles reappear—even though I hadn’t manually attached them (I had manually removed all the relevant lines of code just before exporting the variables). Is this intended behavior? If so, is there a way to disable the automatic token attachment to variables and styles? Additionally, I’ve noticed that when I remove the token attachments to variables and styles via the plugin, some of the related code remains in the JSON file. As a result, I have to export the tokens into the JSON file, manually remove those lines, and then re-import it—which is quite cumbersome. |
First off, glad to hear that your initial issue is resolved! I think the reason they were appearing as ghost variables is because they were out of sync with the plugin. This could be for various reasons that I can't outline since I don't know the history of the file. However, as the first troubleshooting option, re-exporting variables should usually just fix the ghost variables issue.
Are you a part of our slack community? If yes I would like to see a recording of this behaviour, as I want to make sure I'm understanding your issue correctly. |
I think something might be wrong with the lines related to the attachment of tokens, as I’ve started noticing even more strange behavior. In addition to ghost variables, the plugin fails to generate some of the variable modes (themes), and the order of collections and modes is incorrect as well. But again, the issue was resolved by manually removing those lines.
It's happening on my end automatically, after I export the variables and go to the theme settings, tokens and styles are re-attached again without me doing anything. I will try to record and share it.
No. |
@danielius-tvarijonas, you can share the recording with my email |
Describe the bug
After exporting the variables (which include three collections: primitives, semantic, and mode), the referenced color variables in the semantic and mode collections appear as broken or ghost variables (see the image below). However, when I export the variables a second time, it resolves the issue, replacing the broken references with the correct variables. The question mark indicators are replaced with color swatches as expected.
Expected behavior
Referenced variables should display correctly immediately after the initial export, without requiring a second export to fix them.
Screenshots or Screencasts
The text was updated successfully, but these errors were encountered: