-
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
Remove white space mobile view for product page #655
Changes from 1 commit
f444f26
75a15a0
87d531a
73e2c44
9e5da6c
cb84008
f4843fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
|
||
.product__xr-button[data-shopify-xr-hidden] { | ||
visibility: hidden; | ||
display: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @melissaperreault Can I get your 👍 on this, just to confirm that we changed our approach from previous product media decisions? For context: The This can be an issue on slower connections (simulate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At first glance I am concerned by this page jump happening without user interaction and can lead to a poor UX. It is something we debated on our internal implementation of our Debut theme. (https://github.com/Shopify/debut/pull/1166) I would like to bring @tylerrowsell and @sainihas to the conversation as this is affecting a global feature experience and want to bring the right people in the conversation. I'd like to check and sync about other alternatives we could have. cc. @nicklepine There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the technical side of things, one thing that comes to mind as a possible solution to explore... We could detect user agents server side and then make that info available in a liquid drop. It would require a list of all mobile user agents but perhaps could be a starting point. Then we could use progressive enhancements in js to further check ones that we don't detect via user agent. I am not confident in how reliable that would be though, for that reason I would suggest we consider an alternative button/layout for "view in your space". I'll defer to Sai on this one about potential alternative for design. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the main goal of this PR is to avoid the extra space when the merchant is viewing the product page with the 3D button on mobile in the editor mode, I have added the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the commit: 87d531a |
||
} | ||
|
||
@media screen and (max-width: 749px) { | ||
|
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’m not sure why visibility was chosen over display initially, but the button still appears as expected on mobile so hiding via display seems safe. In any case, I imagine we don’t also need the visibility style here now do we?
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 point! Removed