Closed Bug 789863 Opened 13 years ago Closed 12 years ago

Inconsistent use of profile.userName vs profile.displayName

Categories

(Firefox Graveyard :: SocialAPI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: markh, Unassigned)

Details

I suspect the following is due more to luck than planning: * The toolbar notifications shows the profile's "userName". * The share button panel shows the profile's "displayName". * The share button code checks the profile's "userName" - if blank, it decides the button should be hidden - even though it actually displays the "displayName" I suspect the solution is: * both toolbar and sharebutton use displayName if it exists, otherwise fallback to userName. * Never use "profile.userName" as a flag to indicate if the user is logged in or not - if profile is not null, assume it has some meaning. IOW, I don't think we need to care if profile.userName is null but profile.displayName is not, but this will currently not work as expected.
OS: Windows 7 → All
Hardware: x86_64 → All
I just discovered the "fallback" part of this already exists - SocialService does: if (!profile.displayName) profile.displayName = profile.userName; So all components should just prefer displayName over userName.
This was originally done in the share button because the specs said to check userName for truthiness to determine if the user is logged in. As I was working on my test provider, I noticed that the userName is basically useless. What is its purpose anyways? Can we just remove this extra field?
Display name may be the same across accounts, and may not be provided by some services, whereas userName should be unique and always available. Having the userName visible lets the user know for certain which account they are logged into, displayName will not. I have three accounts on one provider, my display name and my profile picture is the same in all three.
(In reply to Shane Caraveo (:mixedpuppy) from comment #3) > Display name may be the same across accounts, and may not be provided by > some services, whereas userName should be unique and always available. > Having the userName visible lets the user know for certain which account > they are logged into, displayName will not. I have three accounts on one > provider, my display name and my profile picture is the same in all three. I take your point, but I'm not sure what is being advocated. * Showing only username - in that case we should be consistent, so displayName should be "dropped" (ie, not used anywhere) * Showing both? Seems a little overkill - although there might be a case for showing both only in the profile area and displayName everywhere else?
I'm advocating that in the provider menu the userName must be shown. That could show both. I don't think the display name in the unshare panel is important, since the data has already been sent, it is just a nicety to show it there.
issue is obsoleted by bug 853151
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.