Use user names in participants list

Hello!

We noticed the list of participants to an event is based on the username. We think it would be nice if the user’s name could be used instead (and username used as a fallback).

Are you interested with this feature ? If so, I’d modify the User component (plugins/discourse-calendar/assets/javascripts/discourse/components/modal/post-event-invitees/user.gjs.

If you think this is a bad idea, can we propose a site setting to toggle this feature?

2 לייקים

That’s a nice idea. Maybe whether username or full name is displayed could be tied to the Enable names site setting? What say, @j.jaffeux?

3 לייקים

I’m surprised it isn’t already tbh. Imo that setting should cover most, if not all, appearances of a username.

2 לייקים

There’s a couple other gaps in the (full) name priority, in notifications and the hover title in the Who’s Online plugin. Should these get reported?

2 לייקים

Let’s see what this topic leads to once our dev chimes in; it might all be covered in one go. Maybe also @lindsey for opinion?

3 לייקים

IMHO we should tie all username / name display to both enable names and prioritize username in ux site settings.

4 לייקים

There are other areas where we could be more consistent with the enable names and prioritize username in ux settings but I don’t think we need to wait to have a complete list before we start fixing them.

@j.jaffeux would you consider this pr-welcome to ensure that the Events participant list shows the full name when enable names is “true” and prioritize username in ux is “false”? That would make it more consistent with how we handle names and usernames on user cards, profiles, etc.

5 לייקים

I’ll work on this once it’s accepted, and on the other places after that, if I can have a list :wink:

4 לייקים

I see a :+1: from Joffrey in reply to your question, @lindsey, so I’ve added pr-welcome here.

3 לייקים

A post was split to a new topic: Guidance on implementing display name precedence

Hello!

Follow up: I opened a pull request :slight_smile:

4 לייקים

Hello @manut

This has been merged in, thanks a lot!

לייק 1

Excellent !

Don’t hesitate to ping me if there are other places where the change can be made.

2 לייקים

I found two other places:

The mentions notifications use only the username even when prefer username is unset/names enabled.

And the Who’s Online hover title on the listed avatars is the username as well, even when the hover on avatars elsewhere (such as latest topics list) is the name.

2 לייקים

Great, should I create new topics for these ?

לייק 1

No need to open a new topic just for those :wink:

If you want to do the PR(s), ping me and I’ll review it (them). Otherwise I can do it as well.

2 לייקים

Thanks !

I’ll do it: I really need to improve my knowledge of the Discourse internals as I work on a plugin for or cooperative and want it to be implemented with the best practices. I still have a lot to learn :slight_smile:

4 לייקים

@zogstrip I started to work on this; I’m going to create a mentioned notification type (in frontend/discourse/app/lib/notification-types/).

I’m using the other notification types as example, and I noticed the usage of this.siteSettings.prioritize_full_name_in_ux (note, it’s not prioritize_username_in_ux).
Its value seems to always be false (like, on a “like notification”, the username is used instead of the full name).

A small grep for prioritize_full_name_in_ux = shows me that it’s only assigned a value in the tests, so it keeps its default value defined in config/site_settings.yml:1005 (false).

Am I missing something or there is a bigger issue here ?

לייק 1

Maybe it was missed during a rename? I’ll look into it :eyes:

2 לייקים