Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add catcol as colour name to use the category colour for the icon #8

Merged
merged 4 commits into from Sep 28, 2020

Conversation

rogercreagh
Copy link
Contributor

Allow catcol as colour specifier to select the category badge colour.

eg "test,hands-helping,catcol,partial"

Most useful with the partial name match so that, in the example, the same icon can be used for all categories with "test" in their slug but they will each pick up their own category colour rather than all using the same. Also provides a quick alternative to having to select a colour for a one-off icon (exact match) - simply use the category colour.

This will also be useful with a proposed further new option to have the icon replace the category stripe whilst maintaining the category colour hint - to be subject of a future PR

Allow catcol as colour specifier to select the category badge colour
Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a useful change, thanks! I would prefer to call the special option "categoryColor", it's easier to understand than "catcol".

Can you also remove the extra files in the commit? Looks like they are coming from Eclipse.

@rogercreagh
Copy link
Contributor Author

rogercreagh commented Sep 26, 2020

Whoops - sorry I thought Eclipse should have filtered them out. They should be gone now and also I changed catcol to categoryColour as you suggested.
I haven't changed the version number in the about.json (it doesn't seem to be there) and also when I tried the current (prior to this PR) on a Discourse 2.5 install it didn't seem to work, although fine on 2.6. Should there be a minimum discourse version specified in there?

.gitignore Show resolved Hide resolved
@pmusaraj pmusaraj merged commit e88463d into discourse:master Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants