Notification with two long usernames cuts off topic name

AI-generated summary

A discussion is underway about an issue with long usernames cutting off topic names in notifications. seanblue initially reported the problem, sharing an image to illustrate the issue. sam suggested that there might not be an easy fix, but awesomerobot proposed a potential solution: limiting the length of the notification before the topic title, possibly by preventing it from wrapping.

As an alternative, awesomerobot also suggested wrapping usernames in their own spans to limit them individually, which would help preserve the “and X others” part of the notification. A pull request (PR #11153) has been created to address the issue, with a proposed solution shown in an image.

See the first notification below. The two most recent users to like this post have such long usernames that I can’t actually see what the name of the topic is. It’s probably not a common use case, but if there’s an easy fix it would be nice.

3 Likes

I don’t think there is an easy fix here, looks like we are restricting to 2 lines. We would have to shorten the names here.

Maybe @awesomerobot has ideas here, but I do not think there is anything easy we can do.

2 Likes

I think I can limit the length of the notification that comes before the topic title, but it would require preventing it from wrapping… which is probably ok because it seems to very rarely wrap anyway? In that case I think the example above would look like…

:heart: 2OC3aOdKhwSGlxfz, DaHackerKnownAs...
      This is a very long example title...

I don’t like that long usernames would eliminate the and 2 others bit, but it’s a balance…

I can also look at wrapping usernames in their own spans so they can be limited individually, which would be better for preserving the “and X others” part…

4 Likes

I’ve got a PR ready that will improve things:

https://github.com/discourse/discourse/pull/11153

5 Likes