mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Graphics frames #156

Closed smmccabe closed 2 years ago

smmccabe commented 2 years ago

Lets you put graphics in frames and will group those graphics into a sub-folder matching the frame name.

I manually updated the test data, but I assume you'd want to pull from an updated figma template.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

mikaelvesavuori commented 2 years ago

Hey @smmccabe! And thanks for your contribution.

Could you just elaborate a bit on how I'd practically check/try this out? I was assuming that it now will pick up graphics from frames (in the Graphics page) and output them into sub-folders—this assumption doesn't seem right as I am not seeing that behavior.

If the need is simply to place graphics in subfolders, there is already support: just name your graphic with slashes to denote the folder structure, e.g. icons/social/facebook.

Happy to merge if we can resolve some of these questions!

mikaelvesavuori commented 2 years ago

Hey, ping @smmccabe! This has been halted, so if you could address the questions I had back in the day I'll be happy to consider this change.

smmccabe commented 2 years ago

This change allows you to put graphics in sub-frames which will translate into subfolders, it allows a little more organization on the figma side of things than just naming them with slashes.

If you look at the test, it has a Social Icons frame within graphics, which then gets turned into a Social Icons folder

PS. sorry for the 6 month response time!

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

mikaelvesavuori commented 2 years ago

This is now released in 4.4.6, please see https://github.com/mikaelvesavuori/figmagic/releases/tag/v4.4.6

I made minor changes to the contribution as well as ensure both the old (and the new) behaviors work correctly.

mikaelvesavuori commented 2 years ago

Thanks for the contribution! 🚀 🥇