Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Improper name formatting of Global Styles #718

Open
ivan-015 opened this issue Oct 13, 2022 · 2 comments
Open

Improper name formatting of Global Styles #718

ivan-015 opened this issue Oct 13, 2022 · 2 comments
Assignees
Labels
bug Something isn't working HacktoberFest HacktoberFest Related Issue, lets get to hacking!

Comments

@ivan-015
Copy link
Collaborator

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 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:

  1. Go to figma.com and create a new Design file.
  2. Create a global color, named something like 012myColor.
  3. Using parabeac_core, convert the file.
  4. 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.

Environment:

  • OS: macOS
@ivan-015 ivan-015 added bug Something isn't working HacktoberFest HacktoberFest Related Issue, lets get to hacking! labels Oct 13, 2022
@rajarshi-ch
Copy link

Hey. Can I have it assigned to me. @Rockfist from discord here.

@ivan-015
Copy link
Collaborator Author

@rajarshi-ch Done! Thanks, let us know if you run into any issues or need any help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working HacktoberFest HacktoberFest Related Issue, lets get to hacking!
Projects
None yet
Development

No branches or pull requests

2 participants