Gustaf-C / anki-chinese-support-3

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1752008591
GNU General Public License v3.0
26 stars 7 forks source link

Unable to say if the plugin is active or not #28

Closed gdelmee closed 8 months ago

gdelmee commented 8 months ago

The "汉字" button in the toolbar doesn’t allow to see if the plugin is currently active or not: image

This means sometimes it doesn’t trigger anything even we’d like too.

But the annoying part is when having done some changes in Pinyin (to help distinguish homophones) and/or classifiers (to remove traditional ones), those are overwritten if we navigate through Hanzi field, then having to redo those customizations.

Before: image

After: image

Gustaf-C commented 8 months ago

I agree that the difference between having clicked the button and not is currently extremely slight and something I'd like to improve, on my system at least there is however a small difference between having clicked the button and not.

Screenshot 2023-11-08 at 10 36 40 Screenshot 2023-11-08 at 10 36 34

Are you sure that there is actually no difference between the two for you? Because that would indicate that something larger needs fixed.

gdelmee commented 8 months ago

Indeed, putting those side-by-side with a good zoom, I can see a light shadow when activated: image

image

But nothing I can spot on the fly, really.

kieranlblack commented 8 months ago

There was actually an issue where the button was not being correctly toggled when an editor was opened even when it was enabled, have a fix for that in #30. As for the looks of the button, we can modify the css of the button at the same time we react to toggles internally. Maybe green when is enabled and no colour otherwise?

Gustaf-C commented 8 months ago

As for the looks of the button, we can modify the css of the button at the same time we react to toggles internally. Maybe green when is enabled and no colour otherwise?

Yes that is something along what I was thinking, although I was planning to make it blue to fit in more with other UI elements.

kieranlblack commented 8 months ago

@Gustaf-C @mdyan @gdelmee Thoughts?

I think I would personally be in favour of making the font not bold here. Also, I think the shifting in the text on the button is due to using text instead of an icon, something I can hammer out in the future but wanted to get initial thoughts.

image image image image
Gustaf-C commented 8 months ago

Yeah that's a clear improvement, I like it! I agree that not having a bold font would probably look nicer.

A detail though is that I think the colour should match the one used for highlighting the selected field.

kieranlblack commented 8 months ago

Using the same colour which is used for highlighting the field might be confusing, since the button itself is not highlighted. Like for example how the Add button is highlighted here

image

It looks identical to what an active state would look like for the toggle

image
kieranlblack commented 8 months ago

I wonder if we should even be trying to fix this issue here. The font buttons have the same issue where the box shadow is really hard to see in dark mode. Maybe it would instead be better to fix this in Anki itself.

Gustaf-C commented 8 months ago

Yeah now that I see it that does look a bit confusing. Maybe turning the entire button blue? I think that was how anki worked a while ago.

But yeah I agree that this is an issue that really affects every toggle-able button in the editor.

kieranlblack commented 8 months ago

Without fixing this upstream in Anki itself it is slightly hacky but we can get something like.

demo

Gustaf-C commented 8 months ago

Fixing it in anki might be the best way to do it, but I think that looks good!

If anki improves it later we can always go back to the default.

kieranlblack commented 8 months ago

Perhaps we can do this for now and also make a post on the forum about the issue calling attention to it for dae. While this works for now, it would be ideal to have a more standardized approach, and I'm not sure what that looks like. I'm sure there are accessibility concerns and other complexities I am not aware of.