Skip to content
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

Merged
merged 17 commits into from
Aug 17, 2021
Merged

Share button UI update #349

merged 17 commits into from
Aug 17, 2021

Conversation

ludoboludo
Copy link
Contributor

@ludoboludo ludoboludo commented Aug 9, 2021

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

@sofiamatulis sofiamatulis self-assigned this Aug 9, 2021
@@ -44,6 +44,7 @@
"item_added": "Item added to your cart"
},
"share": {
"close": "Close share popup",
Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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!

Copy link
Contributor Author

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 👀

Copy link
Contributor

@sofiamatulis sofiamatulis left a 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;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Scroll sideways when input isnt selected.
  2. Click outside the input.
  3. Open the popup again.
  4. Youll see the input empty

https://screenshot.click/09-55-2jdow-wsg2v.mp4

Copy link
Contributor Author

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 :)

Copy link
Contributor Author

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 ?

Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Contributor Author

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.

@LucasLacerdaUX LucasLacerdaUX self-requested a review August 9, 2021 19:02
@Oliviammarcello
Copy link
Contributor

Oliviammarcello commented Aug 9, 2021

Looking good, I have a few notes:

  • The icon is slightly misaligned. Screenshot
  • On hover the text and icon should change to 100% opacity and have an underline. When the popup is enabled, the 100% should remain
  • Reduce padding around share. Screenshot
  • The copy icon is not aligned to the center
  • The popup is slightly out of the margins. Screenshot.
  • The max-width for the popup should be 310px. It shouldn't fill the width of the column. Figma.

I added notes for the featured product share update here. It can be tackled in that issue if its easier, but just an FYI

Copy link
Contributor

@sofiamatulis sofiamatulis left a 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"
]
}
},
Copy link
Contributor

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

https://screenshot.click/10-38-3enf1-lhc0l.png

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh this is coming from the blog post itself due to how it's setup in the admin:

@Oliviammarcello
Copy link
Contributor

Oliviammarcello commented Aug 11, 2021

Looks great!

Just a few fine details to fix:

  • We just got feedback that the "share" label should now be an input field to allow merchants to change it. Sorry for the last-minute change. Screenshot
  • Add the hover styles that Sofia mentioned above
  • The spacing on the blog post page is still a bit large. Screenshot 1 | Screenshot 2
  • Can the dropdown for share have the same animation as the navigation dropdowns? Video.

@svinkle
Copy link
Member

svinkle commented Aug 11, 2021

Three things from an accessibility perspective:

  1. For the JS + fallback env only, apply the disclosure pattern as described in [Global] Details/summary pattern conveys incorrect semantic meaning  #78.
  2. When the close control is activated, shift focus back to the "Share" control. Otherwise, focus is lost and in some env, shifts to the top of the DOM.
  3. Live regions have the best support across environments when content is dynamically injected. The aria-hidden attr technique is not supported in Windows. Since the live content is visible and persists, remove the aria-hidden functionality. Instead, dynamically insert the text content via node.textContent. Clear the content container when the disclosure context is dismissed.

@svinkle
Copy link
Member

svinkle commented Aug 11, 2021

@ludoboludo Is there a new demo link where I can test the changes?

@ludoboludo
Copy link
Contributor Author

ludoboludo commented Aug 11, 2021

@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)

Copy link
Contributor

@sofiamatulis sofiamatulis left a 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

@svinkle
Copy link
Member

svinkle commented Aug 11, 2021

@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.

@ludoboludo
Copy link
Contributor Author

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 👌

sofiamatulis
sofiamatulis previously approved these changes Aug 12, 2021
Copy link
Contributor

@sofiamatulis sofiamatulis left a 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)

@svinkle
Copy link
Member

svinkle commented Aug 12, 2021

@ludoboludo I'm unable to preview the newest change. The previous store link has an error.

@ludoboludo
Copy link
Contributor Author

@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.

@svinkle
Copy link
Member

svinkle commented Aug 12, 2021

Same issue: Theme cannot be previewed because it's missing one of these required files: layout/theme.liquid, config/settings_schema.json

@gretchen-willenberg
Copy link
Contributor

Low priority side revision: replace cannot with can'tcannot is a tell that content design didn't polish this message.
Theme can't be previewed because it's missing one of these required files: layout/theme.liquid, config/settings_schema.json

And, dumb question, but is this 1 file? The comma makes it seem like 2/multiple can be included so:
Theme can't be previewed because it's missing required file(s):

svinkle
svinkle previously approved these changes Aug 12, 2021
@ludoboludo
Copy link
Contributor Author

Theme can't be previewed because it's missing one of these required files:

@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.

@gretchen-willenberg
Copy link
Contributor

Sorry, less a priority than Dawn, more of a nice-to-have improvement. Don't add to your workload now!

LucasLacerdaUX
LucasLacerdaUX previously approved these changes Aug 17, 2021
Copy link
Contributor

@LucasLacerdaUX LucasLacerdaUX left a 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

@ludoboludo ludoboludo dismissed stale reviews from LucasLacerdaUX and svinkle via 0881918 August 17, 2021 18:51
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
@ludoboludo
Copy link
Contributor Author

Followed up on your suggestion @LucasLacerdaUX so it cancelled your approval. I'd need it again along with @sofiamatulis as well 🙂

Copy link
Contributor

@LucasLacerdaUX LucasLacerdaUX left a comment

Choose a reason for hiding this comment

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

LGTM.

💪 🐶 👍

Copy link
Contributor

@sofiamatulis sofiamatulis left a comment

Choose a reason for hiding this comment

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

🚢

@ludoboludo ludoboludo merged commit 789c3d9 into main Aug 17, 2021
@ludoboludo ludoboludo deleted the share-button-update branch August 17, 2021 21:21
@LucasLacerdaUX LucasLacerdaUX mentioned this pull request Aug 17, 2021
5 tasks
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Share Button UI Updates
6 participants