Moving to a Single Category Style Site Setting

If I understand Blake correctly in the first post, nothing will be taken away here and you will be able to configure your site to behave as it does currently using the new GitHub - discourse/discourse-category-badge-styles: Adds the box and bar style for Discourse categories theme component. Just install that and set the category style to none. You can do that right away, even though it does not have any effect yet while the category style site setting exists.

Here’s what the theme complnent setting looks like:

Screenshot 2023-10-18 at 5.39.27 AM

4 Likes

That actually brings up a different question for me, since categories currently disable the color selection for display style of none, will the TC match that behavior, or will it still allow selecting colors? If it allows color selection, then that makes config for the category colors a lot easier.

3 Likes

I just tried it on my site and saw a significant styling difference for the ‘box’ option.

This is how it looks without the theme component:

And with the theme component (larger padding from .badge-wrapper.box and blue font from var(--category-badge-text-color)):

8 Likes

I tested this and was able to replicate it.

10 Likes

Are there any intentions of removing or touching the desktop category page style setting?

2 Likes

This theme component won’t work properly until the changes that remove the alternate styles are merged into Discourse. Currently our work is on a branch, GitHub - discourse/discourse at category-bullet-only… and the theme component is working with that. It’s still a work in progress.

The category icons component will need to be refactored, we can work on that before this update happens.

For the default bullet category style with icons, this should be handled by the component… but for the additional box/bar styles it will require both components.

This is also true for mentions like announcements — we looked at this and the outcome was that it’s too complicated to use a shared component… but I can take another look at how closely we can mirror the HTML & CSS between the variations.

There are a few reasons, but the default bullet style is used by the vast majority of sites we host, and as we’ve introduced new features like the sidebar and category mentions (like this: announcements) multiple styles complicates things.

Supporting multiple variations means we have to accommodate and test for everything 3-4 times. This becomes hard to justify when a feature is purely visual and only used by a small % of sites. Moving something like this to a theme component means we can simplify Discourse a little while still supporting the sites that use the alternative styles.

We generally don’t sell theme components, but we do build custom components for our Enterprise customers. There are no plans for this to change.

No plans at the moment, but this is a similar situation where most sites use the default style (by a wide margin). If we were to do this, we’d likely follow a similar plan and support the removed styles via theme component.

12 Likes

So how exactly to revert to the default to get rid of the warning? Setting Category badge style to bullet?

3 Likes

Yes, that’s correct. No immediate urgency to change anything but you will get a warning on the admin home page until you do.

4 Likes

And that helper component will start work at some point and will hide bullets? Because now it leave bullets untouch and show icons too (for me with none and category icons).

2 Likes

We just pushed an update to the theme component to fix this issue. So you can update to the latest version and enable it now.

This will allow you to choose your existing category badge style within the theme component, but it will not have any effect yet.

3 Likes

I reset our forum back to bullet and the theme component to none, and the bullets are still displaying, is that intentional?

3 Likes

If you want “none” you should set them both to “none” for now. That way when core is updated (we are still working on an update for core) and those settings go away from core the theme-component will know to keep you on “none”. Right now the precedence is still on the core setting, but soon it will be on what you have selected in the theme component.

4 Likes

It works perfectly now. Thanks for the quick update!

4 Likes

Thanks, Bullet helped. In fact it looks even ok, I remeber the bullets have been smaller before thats why i used the lines. (But maybe that was changed in my theme, no idea).

4 Likes

Is there a video of the install process, I find it helpful to view the process and read the instruction at the same time. I rarely make chances to our site as I have this fear I’ll make mistakenly big changes which I’d be unable to fix.

2 Likes

Hi Brian! Are you asking if there is a video showing how to install theme components? There is not but there is a guide at Beginner's guide to using Discourse Themes which you might like to take a look at. We’re here to help in case you run into trouble!

2 Likes

Is there a way to do these installs in a sandboxed version, (I’m on your hosted plan) so that if things screw up it doesn’t affect a live site. Would like to test it our first and if all goes well then apply the fix to my live site.

2 Likes

Looking for instructions on how to switch back to the default (bullet) style. Where would I find those details?

2 Likes

There is nothing to install to switch back to the default bullet style.

Look for the category_style admin setting and change it to “bullet”, so that it looks like this:

Screenshot 2023-11-09 at 6.38.11 AM

Here are the steps:

  1. go to /admin on your site
  2. select SETTINGS from the menu
  3. search for “category style”
  4. select “category style” pulldown and select “bullet” (or select RESET to change it back to the default, which is bullet)

Once you’ve done the above, you will see the bullet style everywhere categories are displayed.

5 Likes

Perfect, thanks for those tips made the fix super simple

2 Likes