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

Variables not working #255

Closed
juliana-negrete opened this issue Jul 31, 2023 · 7 comments
Closed

Variables not working #255

juliana-negrete opened this issue Jul 31, 2023 · 7 comments

Comments

@juliana-negrete
Copy link

I am trying to export figma variables but I click the save & export button and nothing is happening.

Is there a specific set up I need for variables in Figma?
Uploading Screenshot 2023-07-31 at 13.50.20.png…

@lukasoppermann
Copy link
Owner

Hey @juliana-negrete,

the png is sadly not uploaded.

Can you please do the following so I can try to recreate the issue:

  1. Press cmd + option + i to open the console → please take a screenshot of what it says when you click the button
  2. Can you send a screenshot of the variables you have set up?

Thanks

@juliana-negrete
Copy link
Author

@lukasoppermann thanks for getting back to me so quickly.
This is what the console is saying. Attaching files again (let me know if you can see them)

I can also invite you to the figma file if you need
Screenshot 2023-07-31 at 14 28 12
www.figma.com-1690810073384.log
Screenshot 2023-07-31 at 14 28 48
Screenshot 2023-07-31 at 14 28 42

@lukasoppermann
Copy link
Owner

Should be fixed in new release version 66. Please reopen if it persists.

@juliana-negrete
Copy link
Author

@lukasoppermann Thank you! Now it just says no tokens to export. Do I need to select them in a specific way or something?

@lukasoppermann
Copy link
Owner

Hey @juliana-negrete please try again now.

@juliana-negrete
Copy link
Author

@lukasoppermann thank you! they are exporting now. However I believe there is one level missing from the JSON so it doesn't compile in style dictionary.
Basically in my primitives collection I have only one mode called base. This "base" level shows up in the primitives. However when this is then referenced in other tokens that level is not being shown therefore it doesn't compile. If I remove "base" from the JSON it works. I believe that if there is only 1 mode this should either be omitted everywhere or then shown everywhere

https://www.style-dictionary-play.dev/#project=7ZrNctowEIBfJePeMgH8b9wX6KkzvZdOR0gyETG2R7LTppm8ey3LBP9VkHpNaUsOBOSd1afVatcr6dlYI0HnefpAEzHfijQx3hvPq+TmZmV8zTjbsZw9UrEy3t9UrfJvZ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a8pPrGv8
Screenshot 2023-08-01 at 11 15 46
j65i0m+6/rG1df38h/5ceLcVf
MicrosoftTeams-image (40)
2lkRs07mOLtKCq9D9eV8J3d4ubpt315X+L/U5URajXIbS9iGRwKJ7nb2kS4SU/FC+xWZqPEqsuSALFpNPKL9Xz6ufCym1aIlFLFbX5T8fhtq7Dy9ylqC8Og2Tur4+Is7kHIh5p9taZ5UPDlyLV/lBg37pFozbUwa8PWG4W4DBHsa61Y90ix6RwJxl+YIKXzvSV9d5+Qk=

Attaching images with examples. Basically in "value": "{_primitives.color.brand.deep-purple}" it is missing the base level from the primitives so they do not match

@lukasoppermann
Copy link
Owner

Hey @juliana-negrete see #257

This is more complex than one would think. The problem is that we need modes in Json as we would have name duplicates which are not allowed in Json. But in references modes don't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants