Closed Bug 1166935 Opened 9 years ago Closed 9 years ago

Show the user's Firefox Account display name when signed in to Sync

Categories

(Firefox :: Sync, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 42
Iteration:
42.1 - Jul 13
Tracking Status
firefox42 --- fixed

People

(Reporter: zaach, Assigned: eoger)

References

Details

(Whiteboard: [fxsync])

Attachments

(1 file, 4 obsolete files)

We should display a user's Firefox Account "display name" in the preferences and toolbar menu if the have one set.
Simple enough patch, we only show the display name when the account is verified and working.
Attachment #8614282 - Flags: feedback?(zack.carter)
Assignee: nobody → edouard.oger
Hi Ryan, I recall an old mockup where the email address AND the display name were visible. Do we want to only show the display name if it's set and hide the email?
Flags: needinfo?(rfeeley)
Comment on attachment 8614282 [details] [diff] [review] fxa_display_name_in_preferences.patch Review of attachment 8614282 [details] [diff] [review]: ----------------------------------------------------------------- Simple enough. Let's wait on rfeeley's feedback on whether we'll show both the email and name or not. ::: browser/components/preferences/in-content/sync.js @@ +324,5 @@ > + }; > + img.src = data.avatar; > + } > + if (data.displayName) { > + document.getElementById("fxaEmailAddress1").textContent = data.displayName; Perhaps we should change the element ID if it could show a name or email address.
Attachment #8614282 - Flags: feedback?(zack.carter)
Good idea. For expediency’s sake, let's have one area to show either email address or display name. Not both.
Flags: needinfo?(rfeeley)
Updated to use two separate containers (and fixed a bug where it wouldn't show the Display Name when avatar preference was disabled).
Attachment #8614282 - Attachment is obsolete: true
Attachment #8616809 - Flags: feedback?(zack.carter)
Comment on attachment 8616809 [details] [diff] [review] 0002-Bug-1166935-Show-fxa-user-s-display-name-instead-of-.patch Review of attachment 8616809 [details] [diff] [review]: ----------------------------------------------------------------- Just one adjustment and I think this should be good to go. ::: browser/components/preferences/in-content/sync.js @@ +321,2 @@ > try { > + avatarEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled"); Our use of this pref grew broader than its original intention when I named it. Because of reading/writing conflicts with profile data storage, we're using the pref to enabled/disable showing profile information in general. So, we can put both display name and avatar behind this flag.
Attachment #8616809 - Flags: feedback?(zack.carter)
Priority: -- → P1
I discussed this with markh yesterday, he thinks we should live with this misnamed pref until we remove it.
Yeah, I'm wondering if we still need that pref at all since Mark has fixed the issue with profile storage. Mark? If we do keep it, we should probably treat it as "profileInfoEnabled" like in your hamburger menu patch and only show the display name and avatar if it's true.
Flags: needinfo?(markh)
(In reply to Zachary Carter [:zaach] from comment #8) > Yeah, I'm wondering if we still need that pref at all since Mark has fixed > the issue with profile storage. Mark? If we do keep it, we should probably > treat it as "profileInfoEnabled" like in your hamburger menu patch and only > show the display name and avatar if it's true. Agreed - we should treat it as though it applies to all profile info and delete the pref entirely in a few weeks - maybe directly after the next merge (keeping it for now gives us an easy way to disable it if things hit the fan)
Flags: needinfo?(markh)
Attached patch bug-1166935.patch (obsolete) — Splinter Review
Renamed the preference variable to profileInfoEnabled and made sure avatar/displayName are shown only when the pref is true, to be consistent with the Hamburger menu patch.
Attachment #8616809 - Attachment is obsolete: true
Attachment #8630233 - Flags: review?(markh)
Attached patch bug-1166935.patch (obsolete) — Splinter Review
Added r=markh, commit message was written before Whistler ;)
Attachment #8630233 - Attachment is obsolete: true
Attachment #8630233 - Flags: review?(markh)
Attachment #8630240 - Flags: review?(markh)
Comment on attachment 8630240 [details] [diff] [review] bug-1166935.patch Review of attachment 8630240 [details] [diff] [review]: ----------------------------------------------------------------- LGTM - change those vars to lets and re-upload the patch carrying my r+ forward and set checkin-needed. ::: browser/components/preferences/in-content/sync.js @@ +278,5 @@ > .wrappedJSObject; > // service.fxAccountsEnabled is false iff sync is already configured for > // the legacy provider. > if (service.fxAccountsEnabled) { > + var displayNameLabel = document.getElementById("fxaDisplayName"); use let here and below
Attachment #8630240 - Flags: review?(markh) → review+
Updated with let and rebased.
Attachment #8630240 - Attachment is obsolete: true
Attachment #8630558 - Flags: review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Blocks: 1182288
Rank: 0 → 15
Whiteboard: [fxsync]
Iteration: --- → 42.1 - Jul 13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: