-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Spaces in token name doesn't work #323
Comments
I think one problem with the current implementation is that it's possible to import design tokens with spaces in the name, but you are unable to rename/save them unless you remove the spaces in the name. |
Yes @jchiem, you are right that kinda enforces the problem. And since Figma allows spaces in names of Styles and Style Dictionary allows spaces in keys, I don't see any reason why the plugin shouldn't :) |
I agree, should be an easy fix. The W3C draft also has a space in their example token name, so this should be supported. https://design-tokens.github.io/community-group/format/#name-and-value |
* allow spaces in token names * remove unneccessary escape fixes #323
* Box shadows (#306) * add support for multiple box shadows * fix color evaluation * remove logs * remove logs * revert css removal * remove line * remove code not part of boxShadows * fix alias calculation (#307) * fix lightOrDark visualization by converting hsla before calculating (#311) * fix lightOrDark visualization by converting hsla before calculating * fix tests * fixes #295 (#304) * fixes #295 * add spec * add textCase and textDecoration (#303) * add textCase and textDecoration * add tests * add more tests * add transforms to allow users to type lowercase * add tests and transforms * introduce small_caps and small_caps_forced * remove log * add type props * add working pull/update with json * add catch for lightOrDark * fix removal of documentation tokens * move extraProperties to upper layer so isActive works * bump release * add edit boxshadow ui * add pretty import dialog * fix shadow input not updating, styling * add test for filterMatchingStyle * add tests for setEffectValuesOnTarget * add tests for setValuesOnNode * update tests for updateStyles * add test for tokenHelper array * add cypress tests * add cypress spec * fixes #331 * remove log * fix apply shadows * GitHub sync enterprise support & optimizations (#329) * add working gh enterprise sync * Add baseUrl to permission check * remove console log * fix unexpected pull * add checks for future optimizations * add tests * add permission check to restoring * fix git sync permissions * fix duplicate keys * show error when bad credentials * fix cancel import * Allow spaces in token names (#339) * allow spaces in token names * remove unneccessary escape fixes #323 * fix spec * Update tokens.spec.js * Update tokens.spec.js * fix dnd * bump release
Fixed in release 69 🎉 |
Describe the bug
It seems like spaces in token names are not allowed by the plugin? Even though there's no visual indication (e.g. a red border on the input) it appears the plugin doesn't allow you to put a space in the name when you're adding/editing a token and it can't lookup an alias with spaces in it's name?
To Reproduce
Steps to reproduce the behavior:
Edit:
Lookup:
Expected behavior
AFAIK Style Dictionary doesn't imply any rules regarding naming of tokens (casing, spaces etc), so I don't see why the plugin should. I.e. it makes it impossible to use a style / token called "Light Blue" for example.
Screenshots or Screencasts
🚫 Not allowed:
✅ Working:
❌ NOT working:
Figma file (optional)
Send us the link to a Figma file containing a reproducible example
JSON (optional)
If possible, attach the JSON that leads to this bug.
The text was updated successfully, but these errors were encountered: