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

Allow to set if Variables, Styles or Hex values are applied on applying tokens #2213

Closed
Tracked by #2106
esthercheran opened this issue Aug 31, 2023 · 8 comments · Fixed by #2781
Closed
Tracked by #2106

Allow to set if Variables, Styles or Hex values are applied on applying tokens #2213

esthercheran opened this issue Aug 31, 2023 · 8 comments · Fixed by #2781
Assignees
Labels
design Design is needed m2-followup plugin v2 variables, UI, WTCG format, Bitbucket QOL Quality of Life improvements

Comments

@esthercheran
Copy link
Collaborator

esthercheran commented Aug 31, 2023

When I have tokens linked with variables and styles, I want to set what should be applied on Figma when tokens are applied through the plugin.

Introduce a setting in the settings tab that will allow a default to be set, with each option explained.

  • Variables
  • Styles
  • Raw values

This behaviour should happen for all token types depending on whether they are applicable in variables and styles.

Image

The logic of applying the values would be as follows:
Prefer Variables:

  • If variables are present and styles are present, apply variables
  • If variables are not present and styles are present, apply styles
  • If variables and styles not present, apply raw values
    Prefer Styles:
  • If styles are present and variables are present, apply styles
  • If styles are not present and variables are present, apply variables
  • If styles and variables are not present, apply raw value
    Use raw values:
  • Always apply raw values irrespective of styles or variables being present or not
@six7 six7 changed the title Allow to set if Variables, Styles or Hex values are applied on applying tokens Allow to see if Variables, Styles or Hex values are applied on applying tokens Sep 4, 2023
@six7 six7 changed the title Allow to see if Variables, Styles or Hex values are applied on applying tokens Allow to set if Variables, Styles or Hex values are applied on applying tokens Sep 4, 2023
@six7 six7 added the design Design is needed label Sep 4, 2023
@six7 six7 moved this from 📥 Triage to 🧑‍🎨 Shaping in Tokens Studio for Figma Roadmap Sep 4, 2023
@SamIam4Hyma
Copy link
Collaborator

This sounds great!

If they change their mind later, how can they switch to an alternate representation? Ex: Variables today, styles tomorrow

If the representation doesn't exist any more, like if variables are deleted, then what?

Are the settings on the file side, or the plug-in side? If I want to have multiple files using the same tokens can I have 1 file showing styles and another showing variables? This gets into the multiple file sync needs convo.

@SamIam4Hyma
Copy link
Collaborator

Will there also be consideration for the Figma feature of referencing a variable in a style for this one?

image

@LukeFinch LukeFinch moved this from 🧑‍🎨 Shaping to 📤 Ready for dev in Tokens Studio for Figma Roadmap Oct 11, 2023
@LukeFinch
Copy link
Contributor

I'm going under the assumption that 'Hex' should actually be Raw value?
For example if I don't want a border-radius variable to be applied, and just want the number.

Can you confirm @esthercheran ?

@esthercheran
Copy link
Collaborator Author

@LukeFinch yes the raw value

@esthercheran
Copy link
Collaborator Author

@SamIam4Hyma would it better to have this setting specific to a document?

@SamIam4Hyma
Copy link
Collaborator

UX Research shows that this feature is desired, but the wording in the design mockups was confusing and most users were unsure that the settings is the best place for this menu option.

If we have an "apply to" settings, could it also be accessed there?

@robinhoodie0823 robinhoodie0823 moved this from 📤 Ready for dev to 🕜 In Progress in Tokens Studio for Figma Roadmap Nov 16, 2023
@robinhoodie0823 robinhoodie0823 moved this from 🕜 In Progress to 📤 Ready for dev in Tokens Studio for Figma Roadmap Nov 17, 2023
@rbosker rbosker moved this from 📤 Ready for dev to 🧑‍🎨 Shaping in Tokens Studio for Figma Roadmap Dec 4, 2023
@SamIam4Hyma SamIam4Hyma added quick wins QOL Quality of Life improvements labels Mar 26, 2024
@six7 six7 removed the quick wins label Mar 29, 2024
@UdayHyma
Copy link
Collaborator

@SamIam4Hyma SamIam4Hyma added the plugin v2 variables, UI, WTCG format, Bitbucket label Apr 26, 2024
@six7 six7 self-assigned this May 22, 2024
@six7 six7 moved this from 🧑‍🎨 Shaping to 🕜 In Progress in Tokens Studio for Figma Roadmap May 22, 2024
@six7 six7 linked a pull request May 26, 2024 that will close this issue
@six7 six7 moved this from 🕜 In Progress to 👀 Needs review in Tokens Studio for Figma Roadmap May 26, 2024
@six7
Copy link
Collaborator

six7 commented May 28, 2024

Will be part of 2.0 RC7

@six7 six7 closed this as completed May 28, 2024
@github-project-automation github-project-automation bot moved this from 👀 Needs review to ✅ Done in Tokens Studio for Figma Roadmap May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design is needed m2-followup plugin v2 variables, UI, WTCG format, Bitbucket QOL Quality of Life improvements
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants