Global Styles in Figma have wide flexibility in the naming. As such, Figma allows me to name my global styles something like 012 My Style. This is a problem because parabeac_core will export this style name as a variable named 012myStyle.
The goal of this issue is to correctly format color names in such a way that we remove any invalid special characters, and move any initial numbers in the variable name to the end of the variable.
Therefore, 012my$Style shall convert to myStyle012.
If we detect a global style with a name such as 500we shall change it to <styleType>500. For example, if we have a Global Color named 500, the name will change to color500.
To Reproduce the bug
Steps to reproduce the behavior:
Go to figma.com and create a new Design file.
Create a global color, named something like 012myColor.
Using parabeac_core, convert the file.
You should see that in the themes folder, there is an error because the global color printed out its literal name.
Impact of the problem
The problem is that the bug causes compiler errors that will not allow users to run their project.
Describe the bug
Global Styles in Figma have wide flexibility in the naming. As such, Figma allows me to name my global styles something like
012 My Style
. This is a problem because parabeac_core will export this style name as a variable named012myStyle
.The goal of this issue is to correctly format color names in such a way that we remove any invalid special characters, and move any initial numbers in the variable name to the end of the variable.
Therefore,
012my$Style
shall convert tomyStyle012
. If we detect a global style with a name such as500
we shall change it to<styleType>500
. For example, if we have a Global Color named500
, the name will change tocolor500
.To Reproduce the bug
Steps to reproduce the behavior:
012myColor
.themes
folder, there is an error because the global color printed out its literal name.Impact of the problem
The problem is that the bug causes compiler errors that will not allow users to run their project.
Environment: