Skip to content

Studio: Clicking the user avatar in settings should got to their WP.com profile - #5

Merged
katinthehatsite merged 2 commits into
trunkfrom
add/link-to-gravatar-image
Apr 23, 2024
Merged

Studio: Clicking the user avatar in settings should got to their WP.com profile#5
katinthehatsite merged 2 commits into
trunkfrom
add/link-to-gravatar-image

Conversation

@katinthehatsite

Copy link
Copy Markdown
Contributor

Closes https://github.com/Automattic/dotcom-forge/issues/6641

Proposed Changes

This PR adds a link to Gravatar image in the settings modal that brings the user to their WordPress.com account.

Testing Instructions

  • Pull the changes from this branch locally
  • Start the app with nvm use && npm install && npm start
  • Click on the Gravatar image in the right sidebar to open the Settings modal
  • Click on the Gravatar icon in the modal
  • Confirm that you are brought to your WordPress.com account https://wordpress.com/me

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@katinthehatsite katinthehatsite self-assigned this Apr 22, 2024
@katinthehatsite katinthehatsite changed the title Local Environment: Clicking the user avatar in settings should got to their WP.com profile Apr 22, 2024
@derekblank
derekblank self-requested a review April 23, 2024 00:00

@derekblank derekblank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was able to verify that clicking the Gravatar button opened https://wordpress.com/me successfully.

@kozer kozer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and works as expected!

However, when the button is in :focus or :focus-visible state, the following outline appears.

2024-04-23T08:06:46,952399526+03:00
2024-04-23T08:07:19,375863452+03:00

Also note that the cursor pointer is also displayed if you are not directly on the image ( due to button padding ).

This is not a big deal, but maybe we want to improve that by removing padding/margin and outline on focus.

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

Hi @kozer - I think it is because I am using the <Button> component that is wrapping the Gravatar and it seems that this is what it comes with in terms of accessibility. I will check a bit further 👀

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@kozer I have removed the padding at the bottom/top and left/right but left the outline for the accessibility (this is what we already have in the sidebar implementation of Gravatar as well - example below):

Screenshot 2024-04-23 at 8 42 10 AM

What do you think?

@kozer

kozer commented Apr 23, 2024

Copy link
Copy Markdown
Contributor

@kozer I have removed the padding at the bottom/top and left/right but left the outline for the accessibility (this is what we already have in the sidebar implementation of Gravatar as well - example below):

Screenshot 2024-04-23 at 8 42 10 AM What do you think?

Yes, that's great Kat! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants