Discourse Show Fullname in Mentions

Using the component: no, it depends on the plugin.

But you should be able to just rename the handle of the group, since in a German discourse, group 10 is named “vertrauensstufe_0”, not “trust_level_0”. Therefore, you might succeed setting the name to “everybody”.

That makes sense. From a developer’s viewpoint, what does a.mention-group contain or better said, how can I see a.mention-group’s data structure? I am not a Javascript developer by trade but I can work backward programatically well enough. I am attempting to modify @saquetim’s extension to get the data from a.mention-group and a.mention to blend together with Ajax.

OK, I’ve managed to get some time to improve this theme-component this weekend and updated it to v2.0.

It’s much more efficient now.

The v2 of the component includes the following new features:

  • the loading of the users’ data was optimized to make as few Ajax requests as possible, fetching up to 50 users/groups per request.
    It also can leverage the serialized data if the Site Setting enable user statusis enabled. In this case, it will perform Ajax requests only to fetch data for group mentions.
  • Added support to display full names for groups mentions.
  • Added setting to customize how the names are rendered in the mentions
  • Added support to reverse the rendered mentions text back to the original markdown when quoting.

The new version requires a pretty recent feature is Discourse, so you need to update Discourse at least to 3.2.0.beta2.

@Hifihedgehog, @thoka if you want to try it. Please let me know if you encounter some issue.

6 Likes

I have one minor issue. I can see the full or display name for user mentions in the suggestion bar but I don’t see it in the post. See below. I do see the full or display name for group mentions in both the suggestion bar and in posts. See also below. So bottom line, the full name appears to be showing for group mentions across the board but not for user mentions and specifically only in the posted content.

This is quite weird.|

Did you update your Discourse instance lately? It needs a very recent feature.

Furthermore, are there any errors in the console?

Yes, I am on the latest update as of this morning. I updated per your instructions though I was already on 3.2.0.beta2. So I am now on 3.2.0.beta3-dev. No errors that I can see in sidekiq.

I mean, the browser console. Sorry.

Can you open the browser DevTools and check if there are some errors?

@Hifihedgehog, there was a bug when handling usernames that were not fully lowercase. Can you update the component later and try again?

Yes, all working from my end! Thank you for the quick turnaround! :smiley:

1 Like