manut proposed updating the event participant list to display the user’s full name instead of their username, suggesting a modification to the User component. tobiaseigen supported the idea, suggesting it align with the Enable names site setting. chapoi and jordanjay29 noted that other areas, such as notifications and the ‘Who’s Online’ plugin, also suffer from similar inconsistencies.
zogstrip recommended tying all username/name displays to both enable names and prioritize username in ux settings. lindsey marked the initial request as #pr-welcome, asking manut to implement the change for the Events participant list. manut submitted a pull request, which was merged by chapoi.
Following the merge, jordanjay29 identified two additional inconsistencies: mentions notifications and ‘Who’s Online’ hover titles still use usernames. manut offered to fix these, and zogstrip encouraged them to submit PRs for review.
During development, manut discovered that prioritize_full_name_in_ux appeared to always be false and was only assigned in tests. zogstrip agreed to investigate. manut subsequently opened a new PR to remove the potentially obsolete setting. Although the PR initially failed tests, jordanjay29 expressed strong support for the changes. nicolas.duclos inquired about the integration status, noting the update’s necessity for their instance.
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?
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.
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.
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
@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 ?