-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Share button UI update #349
Conversation
locales/en.default.json
Outdated
@@ -44,6 +44,7 @@ | |||
"item_added": "Item added to your cart" | |||
}, | |||
"share": { | |||
"close": "Close share popup", |
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.
@Oliviammarcello what could be the copy/content here 🤔 it's basically to announce the role of the button to screen reader.
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.
@gretchen-willenberg Do you have any thoughts on what this text should be?
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 don’t think we have to include popup
since that’s just the container vs the role/action. But, it would be good to align it to the initial state. What is that?
I’m guessing….
Action: I don’t like this literal action of the UI vs what user intent is
V1. Open share
Role:
v1. Share product
v2. Share this product
Closing the popup
Role :
v1. Close
See Polaris
Action:
V1. Close share
Additional feedback: Exclamation marks should be celebratory, and copying to clipboard doesn’t meet that threshold to me. Can we remove the ! And just say Copied to clipboard
Side take: Let's track the Shares for Blog post: My gut reaction is that end-user customers/readers are less likely to share a blog post before they read it? Under the title seems very immediate and gives users an action before reading the blog post…which to me is the primary action of visiting the page. I’m hesitant to drive attention away so quickly. On the other hand, it’s clearly secondary and not overly dominating. Use will tell us!
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.
Good points 🤔 👌 Thanks for the 👀
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.
Nice :) Added a few comments from testing and will look at the code afterwards
} | ||
|
||
.share-button__message:not(:empty):not(.hidden) ~ * { | ||
display: none; | ||
} | ||
|
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.
- Scroll sideways when input isnt selected.
- Click outside the input.
- Open the popup again.
- Youll see the input empty
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 hadn't replied to this since it's related to your previous comment. I will take a look and see why it's happening :)
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.
Seems like an edge case. I tested using Opera on mobile and it used the web share API. iOS supports it as well, Chrome, Firefox and Samsung internet on mobile.
It's only when using the inspect tool and the mobile simulator. I feel like it's probably ok to skip this. What do you think ?
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.
Sounds good :) We can create an issue as an enhancement, but I agree it's an edge case
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.
Actually this seems to be happening on desktop too: #349 (comment)
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 like it's a chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=596804
When I try on Firefox it's not doing as well.
Looking good, I have a few notes:
I added notes for the featured product share update here. It can be tackled in that issue if its easier, but just an FYI |
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 great 👍 Added a few small comments and will do another pass
"content", | ||
"share" | ||
"share", | ||
"content" | ||
] | ||
} | ||
}, |
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.
Is there a console log I am missing? 🤔 I dont see it on main
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 great! Just a few fine details to fix:
|
Three things from an accessibility perspective:
|
@ludoboludo Is there a new demo link where I can test the changes? |
Yes @svinkle, sorry for the delay. Links are updated in the PR description. (storefront) |
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.
Thanks for all the updates 👍 Did a review on the code and then I can do a final overall pass
@ludoboludo Looking good. Still not sure about the focus management part. Can you confirm focus shifts back to the share control on close? I'm not seeing a focus ring, nor do I see the control in the console when I use my What has focus? bookmarklet. |
Confirmed you were right! I was focusing the button instead of the summary element, should be good now 👌 |
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 great :) Thanks for all the changes, Ludo 🎉
Added one small comment to update the motion-reduce
to only be in the animateMenuOpen
, but not in the icons since we dont have it on the other icons in the theme (for consistency and to follow the best practises)
@ludoboludo I'm unable to preview the newest change. The previous store link has an error. |
@svinkle hmm odd. Something must have gone wrong when I copied the preview link. Should be good now. |
Same issue: |
Low priority side revision: replace And, dumb question, but is this 1 file? The comma makes it seem like 2/multiple can be included so: |
@gretchen-willenberg this would be a change on the platform level. It's not part of the theme, I could do some digging if necessary to see which team could tackle it. |
Sorry, less a priority than Dawn, more of a nice-to-have improvement. Don't add to your workload now! |
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 to me. Just left a minor adjustment but everything should be good :D
0881918
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Followed up on your suggestion @LucasLacerdaUX so it cancelled your approval. I'd need it again along with @sofiamatulis as well 🙂 |
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.
LGTM.
💪 🐶 👍
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.
🚢
Why are these changes introduced?
Fixes #204
What approach did you take?
Edited the styling and some of the JS functionality.
Other considerations
Is there classes I could reuse that I didn't 🤔
Demo links
Checklist