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

Impossible to add a new variable without loosing all references #2055

Closed
XavierVilars opened this issue Jul 11, 2023 · 6 comments
Closed

Impossible to add a new variable without loosing all references #2055

XavierVilars opened this issue Jul 11, 2023 · 6 comments

Comments

@XavierVilars
Copy link

Describe the bug

  • I have a list of variables I created using the "create variables" feature.
  • I recreated one by one all the references I need with other variable contained in a specific Figma file.
  • I created a new token in token studio.
  • To add it to my list of variable I hit the button "create variables" again.
  • all my previous modifications are lost. No more references....

It's clearly a bloker.

To Reproduce
See above

Expected behavior
I want to be able to add, remove, edit tokens in Token Studio without loosing my previous work. Of course all is related to the fact that for the moment Token Studio is not in capacity to memorise the location of my tokens in my figma"s files.
Finally it's only asking for Token Studio to take into account a new parameter: the figma reference.

Cheers.

@six7
Copy link
Collaborator

six7 commented Jul 17, 2023

We already support Figma references.

As long as

  • the reference is a hard one (e.g. just {colors.gray.500})
  • the reference exists as a variable
  • the referenced variable has a connection to a theme

we will apply the correct reference

This means, that if for example your theme set refers to a token from the core set, that you need to create a theme where your core tokens are created as a variable. That means having a structure like this:

Image

which was created by a theme structure like this:

Image

and results in this

Image

@six7
Copy link
Collaborator

six7 commented Jul 26, 2023

Closing, feel free to reopen if you feel it's not solved

@six7 six7 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
@github-project-automation github-project-automation bot moved this from 📥 Triage to ✅ Done in Tokens Studio for Figma Roadmap Jul 26, 2023
@XavierVilars
Copy link
Author

XavierVilars commented Aug 7, 2023

Hello Six7,
So I don't understand your answer :). I'm following headless structure. To do so I have 3 Figma files:

  • Core
  • Semantic
  • Component.

Semantic file use Core references, and components file use Semantic references. Components file don't know anything about core file.

So for each file my list of variable is:

  • Core file : Core theme / no references
  • Semantic file: light theme, dark theme / references to Core file variables list.
  • Components file: Tier 3 tokens / references to Semantic file variables list.

For usability reasons I don't want to duplicates all tokens as variables in all my files. Praticlay speaking if a designer use the semantic library in Figma, then I don't want to expose Core variables. Of course I could set them to "don't publish" but I dont want to do that manually on 200 variables one by one.
Also if all my tokens are duplicated in multiple files in Figma then it means if I do a modification in Core token then I need to be sure this mofication is applied in 3 differents locations. It's a source of issues.

Tell me, may be I'm wrong ? :)

@XavierVilars
Copy link
Author

my themes on Token studio:
image

@XavierVilars
Copy link
Author

Don't know how to reopen it.

@esthercheran
Copy link
Collaborator

@XavierVilars I think #1974 and #2023 will solve your use case

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

No branches or pull requests

3 participants