krzmig / strelloids

Browser extension for Trello that adds new features.
MIT License
34 stars 6 forks source link

[Feature] Formatting options for custom tags #25

Open rubcap opened 2 years ago

rubcap commented 2 years ago

Is your feature request related to a problem? Please describe. Automatically assigning different colors to different custom tags is very convenient 👍. But these colors may or may not make the custom tags stand out compared to the Trello labels (e.g. dark-blue custom tag vs. blue Trello label). Also, each user has a different taste, and users may want to have more control over the custom tag formatting.

Describe the solution you'd like Some ideas:

Describe alternatives you've considered This may be related to the fact that custom tags are desaturated (see my earlier feature request)), but I have been disabling custom tags because I couldn't live with the colors (and enabling them afterwards because they make the [tags] stand out better).

Additional context I understand that setting the formatting for each custom tag separately is superfluous (too much work), but more formatting options for all custom tags would be welcome. Feedback_Strelloids

rubcap commented 2 years ago

Hi @krzmig, can I change the custom tag color by modifying a file in Firefox's profile folder? Is there an add-on config file that you store with hex color codes for the tags or something similar? That would be a nice work-around for me. Thanks in advance for your quick response!

krzmig commented 2 years ago

Hello @rubcap . The color of the tags is generated from something like a hash. At the moment it is not possible to change the color for a specific tag. But you should be able to do this by editing the file CustomTags.js. You can try add something like this:

if( tag === 'your_tag' ) return 'hsl( 99, 65%, 55%)';

here (after "{"): https://github.com/krzmig/strelloids/blob/ea56065e804ef308499ca7ffcf9c122113eb5434/content/js/module/CustomTags.js#L135

In next update I will try to add specific colors, but at the moment I'm working on other projects and I don't know when I will come back to strelloids :)

rubcap commented 2 years ago

Thanks, this works! I renamed the add-on's .XPI file to .ZIP, extracted it and made the changes in CustomTags.js. Then zipped and renamed again and replaced the .XPI file under my Firefox profile folder.

A bit cumbersome, but still a work-around!