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

Add option to choose json indentation type #1618

Closed
MaiLeeTR opened this issue Feb 15, 2023 · 5 comments · May be fixed by #1715
Closed

Add option to choose json indentation type #1618

MaiLeeTR opened this issue Feb 15, 2023 · 5 comments · May be fixed by #1715

Comments

@MaiLeeTR
Copy link

Is your feature request related to a problem? Please describe.
Our project uses Prettier code formatter and tabs instead of spaces for indentation. Our team is currently setting up and applying tokens to components in Figma and code.

What our process currently looks like:

  1. Designer pushes up their changes to a tokens branch in GitHub with json file using the default spaces instead of tabs indentation
  2. Checks always fail due to Prettier indentation error
  3. Developer pulls down changes from the tokens branch into their own branch, fixes the error, applies tokens in code, and merges changes
  4. The tokens branch gets conflicts due to differences in formatting, and the developer has to fix conflicts and revert the formatting to what's coming from the plugin for the designer's next push

Due to the indentation formatting differences between the Figma json file and our code, we always have to fix formatting issues and perform additional and time-consuming steps.

Describe the solution you'd like
Add an option to change the indentation formatting of the json file to tabs.

Additional context
Error
Screen Shot 2023-02-15 at 8 15 45 AM

Current indentation
Screen Shot 2023-02-15 at 8 14 08 AM

Option for preferred indentation
Screen Shot 2023-02-15 at 8 13 47 AM

@MaiLeeTR MaiLeeTR changed the title Add option to choose indentation type when exporting Add option to choose json indentation type Feb 15, 2023
@six7
Copy link
Collaborator

six7 commented Feb 17, 2023

I think this would make a nice config parameter that users can define in the settings and we save in the $metadata.json (or $metadata key in the single file sync)

We basically currently stringify our JSON by using 2 spaces, but that could be something users could configure to be tabs instead.

@MaiLeeTR
Copy link
Author

MaiLeeTR commented Mar 6, 2023

@six7 Thanks for the response. Any idea about the priority of getting this implemented?

@six7
Copy link
Collaborator

six7 commented Mar 12, 2023

It's not very high on our list so far, but I'll add it to our quick wins which means it might get picked up sooner during sprints.

@MaiLeeTR
Copy link
Author

It's not very high on our list so far, but I'll add it to our quick wins which means it might get picked up sooner during sprints.

I hope it gets picked up sooner due to being a quick win. Thanks for the update!

@six7 six7 linked a pull request Mar 22, 2023 that will close this issue
3 tasks
@UdayHyma
Copy link
Collaborator

UdayHyma commented May 6, 2024

Migrated to Featurebase

@UdayHyma UdayHyma closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants