קטגוריות משנה מוצגות רק לאחר רענון וכמה בעיות אחרות

Thanks for the new version, which brings better integration with Category Icons. There are some issues though:

  1. If icon color is set in the Category Icons TC and the banner color in Category Banners is set to the same color, the icon in the banner title becomes ‘invisible’
  2. New flex CSS style on the icon breaks long category names with icons on narrow viewports (mobile view)
    image
  3. Category with subcategories doesn’t show banner on landing, shows banner after refresh

First one can be easily fixed with CSS

h1 span.category-icon {
  color: rgb(255, 255, 255) !important;
}

but it would be even better if this could be overriden directly in the TC. Maybe a new setting set category icon color which would be enabled when show category icon is checked.

Second one is trickier, I’ve tried overriding it with CSS without consistent results, perhaps this will need a redesign on the structural level (I believe the icon element was previously in a separate div, but is now included inside h1)?

2 לייקים

Great feedback, thanks! I’ve just merged an update to how the icon is aligned and added a setting that will override the category icon color when it’s enabled. This also requires an update to the category icons component (I needed to add a class name to adjust the layout), so make sure to update that as well.

5 לייקים

Thanks Kris, this works perfectly now.

I’m still having issues with

though, any ideas?

Checked on two different browsers on Android, same result.

2 לייקים

oh I overlooked that one… this happens when directly visiting a subcategory?

2 לייקים

No, this only happens when directly visiting a category which has subcategories.

Edit: this only happens when opening such category directly from /categories view. When using a category drop down to select a category the banner is displayed correctly.

Directly visiting subcategories works fine.

2 לייקים

Hmm, I’m not able to reproduce this…

Kapture 2023-03-31 at 10.59.55

Which desktop category page style are you using in your site settings? maybe I’m missing some specific situation :thinking:

לייק 1

i installed this and have reproduced the error. in a category with a subcategory, i have clicked on the header breadcrumb and when you go to the category the header box is there but not the category banner.

2 לייקים

awesome component btw. i will see if i can screengrab the missing category banner thing…

3 לייקים

ok there are two ways the banner doesn’t show up - from category page (i am running topic author component). it works for sub-categories but not categories. it also happens from the topic header breadcrumb in a topic.

לייק 1

I think I found the cause: in the top category settings set Default List Filter from all topics to no subcategories and refresh, then you’ll be able to reproduce.

@Lilly do you have the same no subcategories set by any chance?

3 לייקים

i have this:

2 לייקים

Oh yes, I can reproduce this now thanks for figuring that out. I’ll look into what’s going wrong with this.

3 לייקים

@md-misko @Lilly, this was due to an inconsistency in Discourse, and this was fixed here at the end of the last week: DEV: Change the params for categoryNone redirect by CvX · Pull Request #20944 · discourse/discourse · GitHub

So this issue should go away the next time Discourse is updated.

4 לייקים

thank you for all your ‘awesome’ work :slightly_smiling_face:

4 לייקים