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

[bug] Horizontal scrolling on mobile. #2617

Merged
merged 2 commits into from
May 10, 2023

Conversation

eugenekasimov
Copy link
Contributor

@eugenekasimov eugenekasimov commented May 9, 2023

PR Summary:

Should be a quick fix for horizontal scrolling issue on mobile while the announcement bar slider has two or more slides.

To reproduce the issue you need to open our demo-store on a real mobile device, the announcement bar has to have at least two slides. Then just try to drag/pull any part of the site to the left or right.

The issue

RPReplay_Final1683580892.MP4

What approach did you take?

Change margin for slider's buttons for tablet and mobile to match page paddings and prevent exceeding width that caused horizontal scrolling effect.

Demo links

Checklist

Copy link
Contributor

@metamoni metamoni left a comment

Choose a reason for hiding this comment

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

I tested this on my mobile and it looks like the issue has been fixed. I haven't noticed any unintentional side-effects either, so this looks good to me 👍

RPReplay_Final1683618155.MP4

@eugenekasimov eugenekasimov self-assigned this May 9, 2023
assets/base.css Outdated
@@ -2110,6 +2110,7 @@ product-info .loading-overlay:not(.hidden) ~ *,
/* utility-bar */
.utility-bar {
height: 100%;
overflow-x: hidden;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is the best way to go about it. I think there is a also another way for mobile to deal with it 🤔 Here we might create this fix when maybe we should revisit our spacing approach ?

We're using negative margin, -1.6rem, for the slider buttons that isn't matching the mobile padding 1.5rem.

I think this could be a more logical fix 🤔 If in fact it does also solve our issue.

Copy link
Contributor Author

@eugenekasimov eugenekasimov May 9, 2023

Choose a reason for hiding this comment

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

Thanks Ludo, I think it's more logical and right solution from technical perspective, however it takes minor visual changes.

I also can assume that we have the same issue for tablet devices, unfortunately I don't have a real tablet to test it, but I would change margin for tablet from -3.8rem to -3.2rem.

All of these lead us to a small visual change but it's really minor.

@melissaperreault @YoannJailin Could you please confirm that we are okay to make those changes?

Before Screenshot 2023-05-09 at 9 58 26 AM Screenshot 2023-05-09 at 9 58 34 AM
After Screenshot 2023-05-09 at 9 57 37 AM Screenshot 2023-05-09 at 9 57 47 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just change the 1.6 value to 1.5 and leave the rest untouched 🤔

We don't have the same issue for tablet devices 👍
On tablet sizes, over 750px and under 990px, the padding on the sides is 5rem while the negative margin applied to the buttons is -3.8rem so we should be safe here 🎉

Copy link
Contributor Author

@eugenekasimov eugenekasimov May 9, 2023

Choose a reason for hiding this comment

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

Oh, you are right, I was actually looking at the header where paddings are 3.2rem.

But anyway, don't you think that, after we change 1.6 to 1.5, 3.2 rem looks a bit better when you try to see how the buttons and hamburger icons are aligned?

If don't change margin for tablet it looks like this 👇
Screenshot 2023-05-09 at 11 40 37 AM

And if we go for changing 3.8 to 3.2 for tablet it looks like this 👇
Screenshot 2023-05-09 at 11 40 00 AM

which is more closer to what it looks on mobile 👇
Screenshot 2023-05-09 at 11 40 13 AM

@ludoboludo @melissaperreault @YoannJailin

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I don't think it's much of an issue for me to keep the tablet look how it currently is. I think that alignment is ideally what we would have on mobile actually. But since the svg icon is a different size compared to the hamburger menu icon it makes it a bit trickier to align.

There is also the possibility to add some extra negative margin to the icon. So the 0.1rem we removed by going from 1.6 -> 1.5 can be added to .slider-button--prev .icon through margin-left: -0.1rem;

Though I don't really think we need to go to that level of nitpicking. Curious to see what designers think 👀

Copy link
Contributor

Choose a reason for hiding this comment

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

I am okay with the alignment proposed! 👍

Copy link
Contributor

@melissaperreault melissaperreault May 10, 2023

Choose a reason for hiding this comment

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

The alignment on what is live currently on the PR demo link works for me. We could be nitpicking for a long time. Someone could argue that the visual impression of the alignment feels right even though it's not when you trace a line to the edge of the icon. The live version of this PR feels good for now, both for Tablet and Mobile. 👍

@eugenekasimov eugenekasimov changed the base branch from main to 10.0.0-release-branch May 9, 2023 17:33
@eugenekasimov eugenekasimov changed the base branch from 10.0.0-release-branch to release/10.0.0 May 9, 2023 17:35
Copy link
Contributor

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

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

👍

@eugenekasimov eugenekasimov merged commit 38fe05f into release/10.0.0 May 10, 2023
5 checks passed
@eugenekasimov eugenekasimov deleted the fix-overflow-mobile branch May 10, 2023 15:59
ludoboludo pushed a commit that referenced this pull request Jun 5, 2023
* Add overflow-x:hidden to prevent horizontal scrolling on mobile.

* Change margin for slider for mobile and tablet.
ludoboludo added a commit that referenced this pull request Jun 6, 2023
* Fix color for image in password (#2608)

* [Image behavior] fixed background jitter fix on mobile (#2611)

* [Animation in editor] Remove transform translate when re rendering and re ordering blocks (#2614)

* Remove transform translate when re rendering and re ordering blocks

* target only what's needed

* [bug] Horizontal scrolling on mobile.  (#2617)

* Add overflow-x:hidden to prevent horizontal scrolling on mobile.

* Change margin for slider for mobile and tablet.

* Remove redundant preconnect to cdn.shopify.com (#2621)

* Update reverse scheme (#2626)

* [Footer] Remove Global Media settings inheritance from images (#2631)

* Send timezone offset as string instead of integer (#2636)

* Fix slider scrolling issue (#2635)

* Fix background gradient for Related Products. (#2641)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Quick add remove animation from image and content (#2657)

* Add default values for color scheme group (#2660)

* Revert unwanted changes (#2669)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Revert "Update from Shopify for theme dawn/release/10.0.0"

This reverts commit 89d927e.

* Remove forced white text color in Image Banner & Slideshow (#2663)

* Remove forced white color.

* Change color scheme for Dawn's default homepage Image Banner..

* Remove warning about color scheme usage.

* Fix bug with transparent buttons on mobile.

* Remove unused info key from translated files.

* Update display of button when it's in a mobile container.

* Update existing placeholder images (#2610)

* Update existing placeholder images

* Featured collection and product card

* Featured product section

* Collection list section

* Featured blog and multirow sections

* Slideshow: change order of placeholder images

* Collage adjustments for product and collection cards

* Image with text adjustments

* Featured product: re-add `.product--no-media` selectors

* Update featured product section

* Update `card-collection`

* Cleanup `card-collection`

---------

Co-authored-by: Ludo <ludo.segura@shopify.com>

* Gradient fix for transparent background medias and cards (#2651)

* Fix media, product, and collection cards placeholder (#2682)

* Fix missing else for collection cards (#2692)

---------

Co-authored-by: Sofia Matulis <sofiamatulis@users.noreply.github.com>
Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com>
Co-authored-by: Mateusz Krzeszowiak <mateusz.krzeszowiak@shopify.com>
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com>
Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Co-authored-by: Andrew Etchen <andrew.etchen@shopify.com>
lougoncharenko pushed a commit that referenced this pull request Jun 7, 2023
* Fix color for image in password (#2608)

* [Image behavior] fixed background jitter fix on mobile (#2611)

* [Animation in editor] Remove transform translate when re rendering and re ordering blocks (#2614)

* Remove transform translate when re rendering and re ordering blocks

* target only what's needed

* [bug] Horizontal scrolling on mobile.  (#2617)

* Add overflow-x:hidden to prevent horizontal scrolling on mobile.

* Change margin for slider for mobile and tablet.

* Remove redundant preconnect to cdn.shopify.com (#2621)

* Update reverse scheme (#2626)

* [Footer] Remove Global Media settings inheritance from images (#2631)

* Send timezone offset as string instead of integer (#2636)

* Fix slider scrolling issue (#2635)

* Fix background gradient for Related Products. (#2641)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Quick add remove animation from image and content (#2657)

* Add default values for color scheme group (#2660)

* Revert unwanted changes (#2669)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Revert "Update from Shopify for theme dawn/release/10.0.0"

This reverts commit 89d927e.

* Remove forced white text color in Image Banner & Slideshow (#2663)

* Remove forced white color.

* Change color scheme for Dawn's default homepage Image Banner..

* Remove warning about color scheme usage.

* Fix bug with transparent buttons on mobile.

* Remove unused info key from translated files.

* Update display of button when it's in a mobile container.

* Update existing placeholder images (#2610)

* Update existing placeholder images

* Featured collection and product card

* Featured product section

* Collection list section

* Featured blog and multirow sections

* Slideshow: change order of placeholder images

* Collage adjustments for product and collection cards

* Image with text adjustments

* Featured product: re-add `.product--no-media` selectors

* Update featured product section

* Update `card-collection`

* Cleanup `card-collection`

---------

Co-authored-by: Ludo <ludo.segura@shopify.com>

* Gradient fix for transparent background medias and cards (#2651)

* Fix media, product, and collection cards placeholder (#2682)

* Fix missing else for collection cards (#2692)

---------

Co-authored-by: Sofia Matulis <sofiamatulis@users.noreply.github.com>
Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com>
Co-authored-by: Mateusz Krzeszowiak <mateusz.krzeszowiak@shopify.com>
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com>
Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Co-authored-by: Andrew Etchen <andrew.etchen@shopify.com>
lougoncharenko added a commit that referenced this pull request Jun 21, 2023
* made the test/default blog post 3 by default

* blog default posts are not mobile responsive and on a slider. created snippet for blog-placeholder that renders into featured-blog with changable arguments

* removed commented out code

* default blog posts now are modifiable by post-limit and column number presets

* reformated code, reverted header back to h1, removed snippet, and made changes as suggested

* noticed the blog section needs a margin bottom when color scheme is applied

* removed padding from blog and removed date and author presets

* Fix link formatting in Related Products heading (#2680)

* fix default UI for dropdown and mega menu (#2644)

* added vertical padding and made l2 bold to mega menu

* added vertical padding to drop down

* fixed default UI for dropdown and mega menu

* added hover effect to all l2 links and fixed overlapping or mega menu

* adding padding to l3 links and fixed hover effect for dropdown

* reverted the mega menu back to the current setting

* changed horizontal grid gap on mega menu and vertical paddings on dropdown menu

* made vertical grid gap at 1.8 rem to match the 3 rem vertical paddings on mega-menu container

* removed the unnecessary lines of code

* removed the text-thickness that was making l2/l3 links a different size from l1 links

* added a hover effect over active link

* removed uneccessary link size and white space

* Add release/v10.0.0 branch fixes to main (#2693)

* Fix color for image in password (#2608)

* [Image behavior] fixed background jitter fix on mobile (#2611)

* [Animation in editor] Remove transform translate when re rendering and re ordering blocks (#2614)

* Remove transform translate when re rendering and re ordering blocks

* target only what's needed

* [bug] Horizontal scrolling on mobile.  (#2617)

* Add overflow-x:hidden to prevent horizontal scrolling on mobile.

* Change margin for slider for mobile and tablet.

* Remove redundant preconnect to cdn.shopify.com (#2621)

* Update reverse scheme (#2626)

* [Footer] Remove Global Media settings inheritance from images (#2631)

* Send timezone offset as string instead of integer (#2636)

* Fix slider scrolling issue (#2635)

* Fix background gradient for Related Products. (#2641)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Quick add remove animation from image and content (#2657)

* Add default values for color scheme group (#2660)

* Revert unwanted changes (#2669)

* Update from Shopify for theme dawn/release/10.0.0

Committed from shop: Skeleton Theme

* Revert "Update from Shopify for theme dawn/release/10.0.0"

This reverts commit 89d927e.

* Remove forced white text color in Image Banner & Slideshow (#2663)

* Remove forced white color.

* Change color scheme for Dawn's default homepage Image Banner..

* Remove warning about color scheme usage.

* Fix bug with transparent buttons on mobile.

* Remove unused info key from translated files.

* Update display of button when it's in a mobile container.

* Update existing placeholder images (#2610)

* Update existing placeholder images

* Featured collection and product card

* Featured product section

* Collection list section

* Featured blog and multirow sections

* Slideshow: change order of placeholder images

* Collage adjustments for product and collection cards

* Image with text adjustments

* Featured product: re-add `.product--no-media` selectors

* Update featured product section

* Update `card-collection`

* Cleanup `card-collection`

---------

Co-authored-by: Ludo <ludo.segura@shopify.com>

* Gradient fix for transparent background medias and cards (#2651)

* Fix media, product, and collection cards placeholder (#2682)

* Fix missing else for collection cards (#2692)

---------

Co-authored-by: Sofia Matulis <sofiamatulis@users.noreply.github.com>
Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com>
Co-authored-by: Mateusz Krzeszowiak <mateusz.krzeszowiak@shopify.com>
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com>
Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Co-authored-by: Andrew Etchen <andrew.etchen@shopify.com>

* made the test/default blog post 3 by default

* added updated placeholder image

* added the different placeholder images, while maintaining ability to edit with presets

* blog card theme settings work on default blog posts

* removed css that wasn't being used

* reverted to original code without theme settings

* fixed prettier error by removing extra quotation mark and made test blog default instead of news

---------

Co-authored-by: Jon Neill <jonathan.neill@shopify.com>
Co-authored-by: Ludo <ludo.segura@shopify.com>
Co-authored-by: Sofia Matulis <sofiamatulis@users.noreply.github.com>
Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com>
Co-authored-by: Mateusz Krzeszowiak <mateusz.krzeszowiak@shopify.com>
Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com>
Co-authored-by: Kjell Reigstad <kjell@kjellr.com>
Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com>
Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com>
Co-authored-by: Andrew Etchen <andrew.etchen@shopify.com>
SmolSoftBoi pushed a commit to m-k-enterprises/dawn that referenced this pull request Feb 18, 2024
* Add overflow-x:hidden to prevent horizontal scrolling on mobile.

* Change margin for slider for mobile and tablet.
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.

None yet

4 participants