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.