in my community, the usernames might differ a lot from the given name. The results to a search also consider the given name, even though it is not displayed. If someone looks for the given name Robert and finds only @asdf2016, it is not be evident that this is actually Robert.
Itโs a magic trick to determine whether name should be included by the serializer. If itโs true, you can find that field in the JSON.
After that, Ember model and widget kicks in. Try console.log(u) in that function so that you can see whatโs in the u. You could access name by u.name there. And youโll need some class for colors probably.
There is a site setting for displaying order of username and name. You could check that site setting and putting the name there.
So as far as @designbygioโs PR is concerned, weโre saying go with the first example in @rriemannโs mockup, which does:
username Full Name
**username** Full Name
Still linking to username of course, but dropping the link styling, since the interactivity is obvious enough in the context of a search drop-down.
The second example in @rriemannโs mockup is a separate discussion and PR altogether. I think this is what weโre proposing:
IF enable names and display name on posts are enabled, and prioritize username in ux is disabled
(i.e. Full Names will display first by default, as shown on Meta)
THEN, also display Full Name first in drop-down-search results.
About style:
currently the username is not in bold. @erlend_sh what you said is:
username in bold and blue color, name normal font-weight and grey color.
Is that correct?
Honestly, Iโm not sure about blue + grey.
I try that solution but i personally didnโt like.
Is there any other place in the app where these style is already used?
As Sam said, i want to keep consistent with other style but i didnโt find any place where these style is used.