Category drop down not truncating ... for longer category names

category drop down selector display property isn’t wrapping / truncating (…) on longer category names.

3개의 좋아요

Without making width changes to keep the same visual, adding an ellipsis might be a solution here:

.name > .badge-wrapper .badge-category {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

image

2개의 좋아요

thanks, i was thinking of CSS’ing it but hadn’t even attempted yet. you saved me some time trying to figure it out! :slight_smile: nice work :clap:

2개의 좋아요

@Lilly does this happen in safe mode? Looking at a longer category here on meta seems to display as expected!

2개의 좋아요

i can confirm it is happening safe mode

@isaac - i added screenshot

1개의 좋아요

I did not check, but there is already CSS code, my bad.

However, it seems to select the category name with a bullet, and there is no bullet on Lilly’s Discourse.

On meta:

Lilly:

i remove my bullets in the badge wrappers. but your code worked fine.

i know there is a setting for category bullets but i like to have granular control over where bullets appear in different themes.

I think this is the cause of your issue, or at least having adverse effects. On the latest version of Discourse:


Did the dropdown options truncate before?

@isaac i’ve removed my badge wrapper hide code and also the ellipses code that @Arkshine provided and i am now running it in safe mode with admin-settings- category style set to none (no badges) and i still get the same issue as the safe-mode screenshot above. components shouldn’t make a difference in safe-mode anyways.

1개의 좋아요

Thanks @Lilly, yup, I can replicate the issue now! Thank you!

2개의 좋아요

FWIW i posted this in UX instead of bug because it’s clearly not a functional or critical issue, and only affects UI appearance for the case of extra long category names (and as we’ve since discovered, no badge wrapper bullets).

This has been fixed here:

https://github.com/discourse/discourse/commit/9268bb92bdcc7d6ec62e5506112542d89e836069

2개의 좋아요

@awesomerobot is awesome :star_struck: thanks!

2개의 좋아요

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