tokens-bruecke / figma-plugin

TokensBrücke is a Figma plugin that converts Figma variables into design-tokens JSON.
MIT License
39 stars 7 forks source link

Right the heuristic wrongs #20

Closed JeroenRoodIHS closed 2 months ago

JeroenRoodIHS commented 4 months ago

Support naming conventions of any casing, and be indiscriminate on separators (currently supporting: "-", "_" and ".").

Please refer to my comment for the reasoning behind this PR (my apologies): https://github.com/tokens-bruecke/figma-plugin/issues/18#issuecomment-1976424443

JeroenRoodIHS commented 3 months ago

I noticed a merge conflict due to upstream changes. Fixed the conflict.

JeroenRoodIHS commented 2 months ago

Hi @PavelLaptev, there is an issue with specific font weight names. An example is Noto Sans, from Google Fonts. In Figma, the font weight 600 is defined as SemiBold. Because the earlier code does not work case-insensitive, this one is missed. Hence, you end up with 400 for the font weight name SemiBold, rather than the desired 600. This PR would solve that issue. Is it possible to merge this?

PavelLaptev commented 2 months ago

@JeroenRoodIHS thank you for the PR! I'll publish the new version now :-)

JeroenRoodIHS commented 2 months ago

@PavelLaptev I do realize that this issue of case-sensitivity was caused by my own sluggishness. Apologies for the inconvenience. A lesson learned by me: test, test and then test some more.

PavelLaptev commented 2 months ago

Thank and don't worry 😉