-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google Account details to user menu dropdown #5775
Comments
@felixarntz do we want to refine this one a bit more as discussed to include stylistic changes to the other items in the menu (e.g. adding icons) or should this be still limited to adding the user details? |
@aaemnnosttv IMO we should go with fully replicating the appearance of the Analytics user dropdown (see screenshot). The user details could look almost 100% like this (minus "Privacy Policy" link, the content could be vertically centered so that it still looks right without that). And for our actions below, I'd say adding icons to get that visual parity would be good. |
@felixarntz added initial ACs here, can you have a look? Also we'll want to define the icons used. |
We have been liaising with UX on this one Seba produced the following Figma file which has been reviewed by @marrrmarrr |
@marrrmarrr I'm a bit confused by the new Figma design. I thought we were aligning with the existing Google services like Analytics? The Figma design now looks different, more importantly though it comes with actions in the dropdown that we don't have. The icons we were speaking about are still missing though. Can you clarify? |
@felixarntz Im sure that the analytics dropdown will be changed soon as its using GM1/2 styles. The one that I made had the same layout and styles from the search console UI. This option has GM3 styles and looks more aligned with our GM2+ system. That said, I just found out that Google One is updating the dropdown. Here is the new view: I think we should use the same one. Thoughts? |
@marrrmarrr I just updated the UI with some other icons. Take a look and let me know what do you think. https://www.figma.com/file/jV9HznsU4ZseiLKZ0CDb80/AccountDropdown?node-id=0%3A1&t=AiLhXtkx3SjuhIPK-1 |
@marrrmarrr Following up on this one. :) |
…le-account-details Add Google account details to `UserMenu`
QA Update: ❌@nfmohit this is looking great. I do have a few minor UI differences to the figma designs.
When comparing like for like, the main difference seems to be the padding around all the elements in the manage sites and disconnect elements, with my site being larger than figma. It's a noticeable difference.
|
Very interesting findings, thank you @wpdarren!
The 1-pixel difference here is due to the decimal differences in the line height of the text. However, the implementation is using the correct tokens according to Figma for the line heights, and hence we can overlook this.
You're right. I think I misunderstood the padding specified in the design as margin and added spacing around the menu items. I have opened a follow-up PR #6516, which fixes this. The total size should now be 335x200 pixels (1-px difference due to the above).
While this isn't a cause of the difference above, I have updated the icon sizes to be more aligned with the designs. |
…ow-up Updates to Google account details in User Menu
QA Update:
|
Hi @wpdarren! Thank you for raising your findings. As you can see in the Figma design, the border colour Let me know if it looks good. Thanks! |
QA Update: ✅@nfmohit apologies for wasting your time there! Thank you for clarifying that though. Verified:
Tested on desktop and small screen sizes on our supported browsers. |
@aaemnnosttv I wanted to add an observation here. Bethany shared a screenshot in Slack of the user menu dropdown and the full name was missing off it. They reset Site Kit and the name appeared. I have tried to recreate it but unsuccessfully. Here's a screencast I have created which shows my site in action. Was on 1.93.0, Site Kit was connected and when I switch to the main branch the full name appears. usm.mp4Thought I would leave this comment in case you spotted anything during approval process. |
Feature Description
In #5724 we updated the tooltip content for the user menu to expose the connected Google account details, like name and email as well as extended our existing infrastructure to capture the users name which wasn't previously stored.
This issue is about extending the contents of the dropdown with these details for consistency with other Google products which often show a larger avatar, followed by the users full name and account email.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/components/UserMenu.js
toassets/js/components/UserMenu/index.js
and update references if needed.assets/js/components/UserMenu/Details.js
which exports theDetails
functional component.core/user
datastore via thegetPicture
,getFullName
andgetEmail
selectors respectively.assets/js/components/UserMenu/index.js
,Details
component in first position ofmenuItems
array.Menu
to style the dropdown as per the designs since theMenu
component is reusable and we don't want all theMenus
to inherit the styles.span
tag with a custom class name for styling purposes.assets/svg/icons
folder.handleMenuItemSelect
to handle the situation where the user clicks on the first element in the menu, i.eDetails
. Nothing should happen and the cursor style should not be a pointer, not there should be any indication that the menu item is clickable.Test Coverage
QA Brief
GM3/sys/light/on-surface
(#1F1F1F
) ->$c-surfaces-on-surface
(#161b18
)GM3/sys/light/on-surface-variant
(#444746
) ->$c-surfaces-on-surface-variant
(#6c726e
)UserMenu
Storybook story.Changelog entry
The text was updated successfully, but these errors were encountered: