Upgrade has broken layout of category view

AI-generated summary

A user reported that an upgrade to Discourse broke the layout of the category view, specifically causing banner images to misalign and post counts to overlap with topics john-lynch. The issue was linked to recent UI changes related to long category titles and overflow in suggested topics john-lynch. Another user confirmed the same problem schungx. A developer awesomerobot identified the issue and pushed a fix, which resolved the main layout problems awesomerobot. The user john-lynch confirmed improvements on desktop but noted aggressive mobile wrapping of category titles and premature wrapping of the site title on mobile john-lynch. The developer awesomerobot confirmed the fixes were now working as expected awesomerobot, and the user john-lynch confirmed that both category titles and site title were now displaying correctly.

I run a small forum for friends to hang out and discuss stuff. This morning I upgraded Discourse to the latest, and now the category rendering on the main discourse page is busted. I had added a banner image to each category. Previously, the banner would be displayed underneath the category title. Now it looks like this:

Instead of the banner image floating nicely underneath the title, it’s not mashed over to the side. You can also see that the post counts are running into the latest topics.

As best as I can tell (and I am by no means a CSS/layout expert, so I may very well be mistaken), this appears to be related to the work done on these issues:

If I use Chrome’s developer tools to change the display for .category-list .category-title-link from flex to block, that almost seems to fix my issue:

The banner images are now below the category titles again and the post counts aren’t running into the latest topic displays. Unfortunately, the lock icons are on a new line, which is undesirable.

I’m not sure what can be done to fix this. Please advise, and thank you.

2 Likes

I updated and see the same problem.

I’m taking a look at this now and will have a fix shortly.

6 Likes

Just pushed a fix, this should be available on the tests-passed branch once tests pass.

https://github.com/discourse/discourse/commit/96b46170941f9ef8f492a993b0fbcbf591a1e9ae

I had to slightly rework a fix from yesterday that was meant to prevent long category titles from breaking the layout.

9 Likes

OK, I’ve pulled the latest fix, and things are definitely better. Viewing the site on my PC via Chrome looks essentially normal. Viewing the site on my phone via Chrome is much improved, but the category names are wrapping much more aggressively than they used to, even though there is plenty of space for them. You can see this here:

You can see the top of the banner image below the category title. There should be plenty of room for the category title to flow into, but it’s wrapping very early. On mobile, that space isn’t being used by anything, so it seems it should be safe for the category title to use.

2 Likes

A post was split to a new topic: Highlighted user on topic list aligned incorrectly

@john-lynch everything should be working as expected now

6 Likes

Yup, my category titles look good on mobile now too, thanks. One last (possibly unrelated thing): the site title on mobile is also taking up two lines now, where I’m pretty sure it used only to take up one. There’s certainly ample space for it on my phone, but it’s now wrapping prematurely. Not sure how that would be related to category wrapping though.

1 Like

This topic was automatically closed after 32 hours. New replies are no longer allowed.