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

Errors Caused With Importing Variables Depending On Selected Options #2742

Open
keeganedwin opened this issue May 8, 2024 · 0 comments
Open

Comments

@keeganedwin
Copy link
Collaborator

keeganedwin commented May 8, 2024

Describe the bug
So currently when a user has number variables setup and imports them with the Convert Numbers to Dimensions option, number variables are converted to tokens in the plugin under the Dimension type.

Errors Caused:

  1. If you import number variables with Use REM for Dimension Values, you get tokens under the Number type with [object object] as values. One assumption is that the plugin is trying to use REM values for Dimension tokens that don't exist as they're imported as Number tokens.

  2. If you import number variables with both options selected Convert Numbers to Dimensions and Use REM for Dimension Values, this results in converting number variables to tokens under the Dimension type with NaNrem as values.

To reproduce:
Please check test file attached below

Expected behavior
With this option selected, values should be imported with REM values

Screenshots or Screencasts
Recording shows token values with [object object] when the Use REM for Dimension Values option is selected on importing.
https://github.com/tokens-studio/figma-plugin/assets/93133012/4115b30e-79fb-4efa-ae18-ae46f21c7f56

Figma file (optional)
Test file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📤 Ready for dev
Development

No branches or pull requests

1 participant