-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Store: Update header area to remove duplicate site info #23705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but shouldn't the site icon / title be a link?
It is on the small screen, which is inline with the site icon on other non-store sections. |
@kellychoffman I just pushed a change that linked them on desktop before seeing your reply. Should I remove the link or keep it? Note that previously the left most site title was linked on desktop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alignment of the buttons looks good now, just a few comments on the site links
@@ -48,6 +49,8 @@ class ActionHeader extends React.Component { | |||
render() { | |||
const { children, primaryLabel, site } = this.props; | |||
|
|||
const link = getLink( 'https://:site/', site ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just use site.URL
here - just to ensure we have the full URL correct
@@ -58,9 +61,15 @@ class ActionHeader extends React.Component { | |||
<Gridicon icon="chevron-left" /> | |||
</Button> | |||
<div className="action-header__content"> | |||
<SiteIcon site={ site } /> | |||
<a href={ link }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add aria-label={ site.title }
to the <a />
, so that screen readers can have some link text?
{ site && <p className="action-header__site-title">{ site.title }</p> } | ||
{ site && ( | ||
<p className="action-header__site-title"> | ||
<a href={ link }>{ site.title }</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, this doesn't need to be a link, it's a very small click/touch target, and causes a duplicate link which can be annoying to screen reader users (assuming the aria-label is added to the icon 🙂 ).
@ryelle Thanks for the comments. Addressed, and agreed about just linking the site icon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again after the updates, looks good!
@justinshreve any reason why this wasn't merged yet? Did this need another look? |
@gwwar Justin has been afk amidst a big move. I'll rebase this and get it shipped today. |
e928224
to
ffe13e3
Compare
Fixes #23343, and is a follow-up to #22541.
This PR removes the duplicate site information from displaying on desktop, and implements Jay's design. It also replaces the back arrow with a chevron as requested.
Before:
After:
To Test: