magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.59k stars 9.32k forks source link

Page Layout/Margins not consistent across all pages when viewed on wide enough screen #30705

Closed gwharton closed 3 years ago

gwharton commented 4 years ago

Preconditions (*)

  1. 2.4.1 and 2.4-develop
  2. The same behavior on Blank and Luma Themes

Steps to reproduce (*)

  1. Deploy a blank vanilla site
  2. Expand browser window so there are left and right margins on screen with site centered
  3. Create a test product in a test category
  4. Browse the following pages, noticing if the position of the logo/navbar/content changes on each page from left/right by a small amount

Expected result (*)

  1. Page Layouts should be consistent

Actual result (*)

  1. They are not
  2. Sometimes the content shifts right and then back again very quickly, other times it stays offset.

8fZgdqCovk


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 4 years ago

Hi @gwharton. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

gwharton commented 4 years ago

Scroll bar visibility being the issue, but can anything be done to improve it.

m2-assistant[bot] commented 4 years ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 4 years ago

The same behavior on the latest 2.4-develop. Rechecked with Blank and Luma Themes

magento-engcom-team commented 4 years ago

:white_check_mark: Confirmed by @engcom-Bravo Thank you for verifying the issue. Based on the provided information internal tickets MC-38805 were created

Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

gwharton commented 4 years ago

As someone pointed out to me, it is because of scrollbar visibility. Loading a page with content below the fold results in a scroll bar, which shifts the content left slightly when the scrollbar becomes visible. The only way I see round it, is to either a) not have a theme that is page centered...... not gonna happen, or b) use overflow-y to keep scrollbar visible all the time.

mrtuvn commented 4 years ago

maybe some section shift content while rendering that cause problem. That's call Cumulative Layout Shift

Leland commented 3 years ago

This is a non-issue IMO.

Long pages have scrollbars. Short pages do not. That's just how browsers work.

The Luma homepage in the issue description's GIF doesn't have a scrollbar because it's, well, an empty homepage. Once content is added, this issue will be "fixed."

ihor-sviziev commented 3 years ago

Hi @gwharton, TBH I do agree with @Leland that it's not an issue, but just a default behavior of the browsers which is expected, so we shouldn't fix that.

What do you think about that?

gwharton commented 3 years ago

As the original reporter of the issue, I was going to close it as soon as i realised it was a scroll bar issue, however after a bit of thought, I couldnt decide whether it was valid or not.

I understand exactly why it is happening, but..... I dunno, it just feels like the luma theme, in its out of the box format, should present a nice example of a UI which doesn't suffer from the shifting when browsing between pages with and without scroll bars.

Once a site is filled with content, I would expect the vast majority of pages would include below the fold content so would not be an issue, but there will occasionally be a short page somewhere, where a jump is seen.

I'm not gonna die in a ditch about it. I now understand why it is happening. I have implemented always visible scrollbars on my site, because that is my preference, and it only actually affects a very small proportion of my pages, so I am happy, and understand that its probably not right to enforce this policy on everyone who uses Luma as a starting point who may not share my views.

Thanks for the work you put in on the PR @mrtuvn, and apologies if it is deemed no longer required.

magento-engcom-team commented 3 years ago

Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily.

Please feel free to comment or reopen according to the Issue reporting guidelines the ticket if you are still facing this issue on the latest 2.x-develop branch. Thank you for collaboration.