This component works by simply replacing the username with the name of the user (if available) when displaying the posts. Nothing changes while editing. You still tag @username like always in the composer.
It also adds the class .mention-fullname to the a.mention anchor element if you wish the style full name mentions in a distinct way.
Displaying the card when clicking in the @fullname mentions remains fully functional.
Imagine a Discourse instance where every username name follows the pattern X9999999 (one letter and seven numbers). Now imagine there are 100k users registered.
Not very friendly, right? Unfortunately, this is a very real scenario and not an imaginary one. The Discourse instance is bonded to SSO and all usernames follow corporate policy.
It’s much better in this case to read @John Doe instead of @X9999999.
Settings:
show_fullname_in_mentions: If enabled @mentions will show the @fullname instead of the @username
I tried it but after experimenting I see it create some inconsistency UX-wise.
Here’s what happens : I got this user whom username is “oli44” and fullname “Henri Oliver”. With your theme component it now displays “Henri Oliver” which is great adds better context. But then, let’s say then I’m another user who doesn’t know that “Henri Oliver” goes by the username “oli44” then how do I mention him in my post?
I’m gonna search for “Henri Oliver” and I will see in deed “oli44” but how can I know it’s the actual person?
For that reason, as it is I’m finally not enabling it for the moment. Do you know eventually another theme component/plugin which would solve that problem? I tried to look for such but couldn’t find.
Or maybe there’s a way your theme component could still show the username (for ex: @Henri Oliver (oli44)) so when I need to mention that person I know what to look for(?)
There will be one ajax request per mention to the server.
Could this lead to throttling in pages with a lot of usernames (like user supplied user directories)?
The cached username to full-name translation will not recognize changes in full-name. How long does this cache live?
I wonder if the needed information (username → fullname) could be provided via a companion plugin, which would make these issues obsolete.
You just posted this and I just installed the original author’s plugin right as you posted. The thing is, I noticed that the original author’s plugin does not support full names for group. However, it looks like you added groups. If so, congratulations! Your plugin deserves its own thread given what you’ve enabled!
Thanks! Now I did. Would searching groups also be possible? I have my trust_level_0 group named as everyone. If the plugin could also use the full name for the group mentions, this would be a cool way to make global trust_level_0 mentions look like an everyone mention.
Since the plugin includes the info while baking the posts. Be aware that if the user updates the full name, it won’t be updated in the post unless the post is rebaked.
I need to update a few things in this theme-component. Removing the Ajax calls is now possible if the user status is enabled.
EDIT: Ah, because the full_name column in the groups table does not hold the modified full name value of trust level groups! Checking data explorer, it is null. Hmm?
Indeed. I tried this, and it worked without any serious impact. Is there a way to incorporate groups without having to use the plugin and only using the theme component? That’s actually preferred for me since I don’t relish raking if I can avoid it.