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

[Bug]: Trying to create variables from Opacity tokens does not create any variables #2481

Closed
six7 opened this issue Jan 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working ❇️ Featurebase Roadmap Issue was added to a featurebase roadmap post Figma export Previously create and sync styles variables Figma variables plugin v2 variables, UI, WTCG format, Bitbucket token type color modifier token type opacity

Comments

@six7
Copy link
Collaborator

six7 commented Jan 29, 2024

Describe the bug
If you have an opacity token and you try to create a variable out of it, it won't work. If you change type to number it will work.

To Reproduce
Steps to reproduce the behavior:

  1. Create an opacity token with value 0.5
  2. Create a theme group that would lead to a valid collection
  3. Click Create variables

Expected behavior
Variable is created / type can be number (which only accepts numbers such as 0.1, 0.2, 1.0) so a conversion needs to happen

CleanShot 2024-01-29 at 09 50 34@2x
{
  "large": {
    "value": "0.5",
    "type": "opacity"
  },
  "largex": {
    "value": "0.5",
    "type": "number"
  },
  "large2": {
    "value": "{largex} / 2",
    "type": "number"
  }
}
@SamIam4Hyma SamIam4Hyma added bug Something isn't working Figma variables Figma export Previously create and sync styles variables token type opacity token type color modifier labels Mar 20, 2024
@six7 six7 moved this from 📥 Triage to 📤 Ready for dev in Tokens Studio for Figma Roadmap Apr 9, 2024
@SamIam4Hyma SamIam4Hyma added plugin v2 variables, UI, WTCG format, Bitbucket ❇️ Featurebase Roadmap Issue was added to a featurebase roadmap post labels Apr 9, 2024
@SamIam4Hyma
Copy link
Collaborator

Added to Featurebase Roadmap as a known issue potentially impacting beta testing performance- ❖ 🚧 ❇️ Variables in stroke weight and opacity

@robinhoodie0823 robinhoodie0823 self-assigned this Apr 18, 2024
@robinhoodie0823 robinhoodie0823 moved this from 📤 Ready for dev to 🕜 In Progress in Tokens Studio for Figma Roadmap Apr 18, 2024
@robinhoodie0823 robinhoodie0823 moved this from 🕜 In Progress to 👀 Needs review in Tokens Studio for Figma Roadmap Apr 18, 2024
six7 added a commit that referenced this issue Apr 18, 2024
…te any variables (#2665)

<!--
  Notes for authors:
  - Provide context with minimal words, keep it concise
  - Mark as a draft for work in progress PRs
  - Once ready for review, notify others in #code-reviews
- Remember, the review process is a learning opportunity for both
reviewers and authors, it's a way for us to share knowledge and avoid
silos.
-->

### Why does this PR exist?
Current plugin does not export opacity tokens as variables.

Closes #2481 <!-- link the related issue -->

<!--
Describe the problem you're addressing and the rationale behind this PR.
-->

### What does this pull request do?
Added opacity token type to token types which can be exported as
variables.

<!--
Detailed summary of the changes, including any visual or interactive
updates.
For UI changes, add before/after screenshots. For interactive elements,
consider including a video or an animated gif.
Explain some of the choices you've made in the PR, if they're not
obvious.
-->

### Testing this change

<!--
Describe how this change can be tested. Are there steps required to get
there? Explain what's required so a reviewer can test these changes
locally.

  If you have a review link available, add it here.
-->

### Additional Notes (if any)

<!--
  Add any other context or screenshots about the pull request
-->



https://github.com/tokens-studio/figma-plugin/assets/103296157/a494334e-95a7-4f1c-871e-4807a56560c9

---------

Co-authored-by: Jan Six <[email protected]>
@six7 six7 closed this as completed Apr 18, 2024
@github-project-automation github-project-automation bot moved this from 👀 Needs review to ✅ Done in Tokens Studio for Figma Roadmap Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ❇️ Featurebase Roadmap Issue was added to a featurebase roadmap post Figma export Previously create and sync styles variables Figma variables plugin v2 variables, UI, WTCG format, Bitbucket token type color modifier token type opacity
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants