thomas-lowry / themer

A Figma plugin designed to allow you to swap between styles named the same from different published libraries.
MIT License
128 stars 43 forks source link

Unable to use the word "Light" as color context #49

Open beazcandido opened 2 years ago

beazcandido commented 2 years ago

Hello!

Right now in the project that I'm working on we have 3 modes: Light, Dark and High Contrast and inside those we have colors that include the name Light as its context (e.g. Foreground Light, Background Light).

But we realized that themer's new version does not allow these colors to be converted, maybe because of the use of Light as both mode and context. Themer's previous version used to allow them to be converted, so we were wondering if there is a way to make that possible again.

thomas-lowry commented 2 years ago

Hey! Can you share the names of your theme, and some examples of the fill names of your styles including the folder structure/prefixes?

Ivy-Y commented 2 years ago

Hello @thomas-lowry - I work on the same team as @beazcandido. To answer your question, the names of our theme are "High Contrast", "Dark" and "Light".

image

Here is a sample screenshot of a few color styles we have in the light and dark themes.

image

I created a little gif to demonstrate the problem. Our theory is that the styles that's not converting are the ones containing the same letter nodes to their parent theme (in this case "Light"). We tried changing their names from "Light" to something else such as "Lt", and they started converting again.

themer-test

thomas-lowry commented 2 years ago

This is super helpful!!! Actively working on this and have an idea what is happening. Keep you posted here.

thomas-lowry commented 2 years ago

Hey @Ivy-Y @beazcandido would you be able to try again and report back. I improved some things about my method of finding matching names. It's hard to explain in few words why this is kind of complex but it should work now. Can you confirm?

beazcandido commented 2 years ago

@thomas-lowry Thank you so much, it works perfectly now!

image

Ivy-Y commented 2 years ago

Thanks a lot for fixing this @thomas-lowry! Works on my end also. 😄

andreigarcia commented 2 years ago

Thank you so much for your support and quick improvement @thomas-lowry!!!