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

Contexts not replacing colors when switching between them #36

Closed
ghost opened this issue Jun 8, 2020 · 2 comments
Closed

Contexts not replacing colors when switching between them #36

ghost opened this issue Jun 8, 2020 · 2 comments
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Jun 8, 2020

Hi again 😬 . I´ve been trying switching between contexts. Tried in one of my Figma's projects, checking if prefix was right, it was. Copied Moana to my projects to double check this, but it doesn't work either.

@ghost ghost changed the title Theemo Contexts not switching between contexts Contexts not switching between contexts Jun 8, 2020
@ghost ghost changed the title Contexts not switching between contexts Contexts not replacing colors when switching contexts Jun 8, 2020
@ghost ghost changed the title Contexts not replacing colors when switching contexts Contexts not replacing colors when switching between them Jun 8, 2020
@gossi
Copy link
Member

gossi commented Jun 8, 2020

Just tested and verified it is working. I'm pretty sure you duplicated a file here 😉

I guess what's the problem here is a missunderstanding of how figma allows plugins to work (I think that's the best way to formulate this). References are currently stored at a document. When this document is duplicated these references are lost. You can see this now for yourself. In the original document where references are available, open the "Stats" tab now in theemo, you see some numbers over there. When you duplicate this document then these numbers are gone, you will see 0 everywhere.
That is because figma is not copying over any plugin related data.

In order to compensate this (kinda) theemo offers an export and import mechanism. You will export all references to jsonbin and after duplicating the document, go to the new one, paste in the url from json bin hit import and your references are back. That is figma plugin API is relatively new and they make curious steps to enhance it, at most to keep those files safe (in terms of permissions).

The other cool stuff of using this export is that theemo can also consult this references and put your design tokens into code.

@gossi gossi added the question Further information is requested label Mar 14, 2021
@gossi gossi transferred this issue from theemo-tokens/figma-theemo Jul 10, 2022
@gossi gossi transferred this issue from theemo-tokens/theemo Jan 21, 2023
@gossi
Copy link
Member

gossi commented Jan 24, 2024

Now, finally Figma did it themselves with variables. Migration is part of #57

Closing here.

@gossi gossi closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant