Is it possible to display only one trust level badge on the user card?

If a user has TL4 badge, I’d like their user card to not also show the TL3, TL2, TL1 badges.
If a user has TL3 badge, I’d like their user card to not also show the TL2, TL1 badges.
If a user has TL2 badge, I’d like their user card to not also show the TL1 badges.

Is there a way to make this happen?

11 Likes

Seems like a good idea, cc: @sam

2 Likes

You know, I think this is pretty important to do - I was just on another forum looking at a user card, and find seeing multiple TL badges is distracting and pushes other badges off the card. So you have to click through to see them. And in this case, it’s just more TL badges!

And while I’m at it - on my forums I have changed the TL names to TL0, TL1, TL2, TL3, TL4 which is how we have begun talking about them, which works better for us methinks than the names Basic, Member, Regular, Leader.

4 Likes

I definitely support this, it is up to @sam.

Also annoying: getting multiple trust level notifications on a new site, though I suppose this is a lament for the staff and admins only:

2 Likes

@sam could you implement this soonly?

Here’s how badges appear now on my site which, as you can see, is duplicative and crowds out more interesting info.

1 Like

Agree that we need special casing here, this is still in my bookmarks list.

3 Likes

Just wanted to bump this subject, as it’s still a bit of an ear flick for me - I’d love to see the badge representation on profiles cleaned up a little bit to give them a more meaningful presence.

2 Likes

I’ve implemented this, and submitted a PR.

Before:

After:

The one thing I wasn’t sure about is what to do when users just have trust level badges, currently the following will happen:

I think it would make sense to make use of the space and display the rest of the trust level badges in a situation like this. However, I expect this is an incredibly rare occurrence (only found when a user has been granted trust levels rather then earned them), and I wonder if it’s therefore worth the added code complexity.

Speaking of code complexity, I spent a while staring at my screen trying to work out if I could make the featured_user_badges query more efficient, but didn’t come up with anything. We end up running the same subquery twice (to find the highest trust level badge a user has) and from what I can tell ActiveRecord doesn’t support WITH queries (which, if my understanding is correct, would mean the duplicated subquery is only ran once). I’m not sure how much of a performance impact this is, though. Again - some advice would be very welcome here.

8 Likes

Shweet. Many thanks! :rocket:

I am loving the improvements to user cards you are doing. Much appreciated.

1 Like

This was merged a few days ago:

https://github.com/discourse/discourse/commit/784366f1a01ce2b257ce0f4347d69672e166592d

Thanks @Falco!

7 Likes