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.56k stars 9.32k forks source link

Magento 2.4.5 Incorrect Breakpoint #37753

Open harrigo opened 1 year ago

harrigo commented 1 year ago

Preconditions and environment

Magento 2.4.5 - Luma / Blank Themes

https://github.com/magento/magento2/commit/04012ba8e939377c626fb853e75794e093173a68#diff-763edb48523a1fbd76ed756edc437ad0f8adf78f4652dd876852166e9efe5d7c

Any version that came in after I believe Magento 2.4.4.

Steps to reproduce

Load on a browser set to 768px wide or iPad mini. (Smallest Tablet / Desktop)

Expected result

Should be desktop.

Actual result

Loads as mobile.

Additional information

Commit mentioned above moves mobile break points, in older versions the breakpoint for mobile seemed to be 1px lower than currently and changed because of some page builder issue that seems completely unrelated to real break points and completely changing how Magento renders on tablets?

Im testing on a portrait iPad mini which is showing mobile when was previously desktop (Small tablet 768px) i've read dev docs and checked some demos online how they behaved and see what is supposed to be happening...

Dev docs states that "Breakpoints are used in the CSS code to set up the screen width at which the design switches from the mobile to the desktop version." and that the mobile breakpoint in Luma and Blank are 768px "@screen__m: 768px (in the Blank and Luma themes, this breakpoint switches between mobile and desktop views)"

https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/responsive-web-design/rwd_css.html

MagePlaza 2.4.5 Demo

This seems to break at 769? so mobile on an iPad Mini at 768px.

https://magento-demo.mageplaza.com/?_gl=1*6n3fs2*_gcl_au*MTAxNjY2NjA5MS4xNjg5MTYwNTYx

MageBit 2.4.? Demo

Breaks at 768 so desktop on an Ipad at 768px.

https://magento2-demo.magebit.com/

Not sure really what the intention is here anymore but feel according to docs the iPad mini (or 768px devices) should be desktop. Have fixed locally to be desktop again at that width but this is incorrect and needs to be sorted. Both the Blank and Luma themes however are mobile at 768px and that commit needs reverting.

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @harrigo. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Dash. 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:


mrtuvn commented 1 year ago

you should target <768 as mobile example

media (max-width: 767.98px) {Any devices below <=767.98}

media (min-width: 768px) {Any devices above and equal >=768}

mrtuvn commented 1 year ago

seem from 2.4.5 core base changed a little bit here

https://github.com/magento/magento2/commit/04012ba8e939377c626fb853e75794e093173a68#diff-763edb48523a1fbd76ed756edc437ad0f8adf78f4652dd876852166e9efe5d7c

i don't know exactly context of this new update

seem core check device from above 769

mrtuvn commented 1 year ago

@magento give me 2.4.5 instance

magento-deployment-service[bot] commented 1 year ago

Hi @mrtuvn. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @mrtuvn, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

harrigo commented 1 year ago

seem from 2.4.5 core base changed a little bit here

04012ba#diff-763edb48523a1fbd76ed756edc437ad0f8adf78f4652dd876852166e9efe5d7c

i don't know exactly context of this new update

seem core check device from above 769

Yea i've just been made aware of that commit, not sure if this was intentional does seem a little strange. In fact completely wrong, i've reverted that locally.

harrigo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @harrigo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @harrigo, here is your Magento Instance: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering Admin access: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering/admin_776b Login: ac5c10aa Password: 7f4900611028

mrtuvn commented 1 year ago

i don't have time for dig more in this but seem styles between media queries seem not work as expect anymore

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
// Styles in here not to build to final output
}

but add code styles here still work => super weird

i'm pretty shocked how happen this commit from 2 years ago merged to current upstream code

engcom-Dash commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Dash, here is your Magento Instance: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering Admin access: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering/admin_9162 Login: 872d765a Password: a6807a80e299

engcom-Hotel commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Hotel, here is your Magento Instance: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering Admin access: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering/admin_3cdc Login: bc3c9e86 Password: d69c9bd73708

engcom-Dash commented 1 year ago

Hi @harrigo,

Thanks for reporting and collaboration. In iPad mini, the browser is set to 768px and loads as in desktop, it seems to working as expected.

please refer to the attached video evidence.

https://github.com/magento/magento2/assets/60198592/f3508513-8e96-47c7-a023-2efc86590d9d

Let us know if we have missed anything.

Thanks

harrigo commented 1 year ago

Thanks for the update In the video evidence it loads all the menu and header as mobile however?

On Mon, 25 Sept 2023, 14:32 susena sravani simhambhatla, < @.***> wrote:

Hi @harrigo https://github.com/harrigo Thanks for reporting and collaboration. In ipadmini the browser is set to 768px and loads as in desktop. working as expected. issue not reproducible. please refer the attached video evidence.

https://github.com/magento/magento2/assets/60198592/f3508513-8e96-47c7-a023-2efc86590d9d

— Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/37753#issuecomment-1733721424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2INP34AE7YTNUZRJLIIB3X4GBXBANCNFSM6AAAAAA2HMMZGY . You are receiving this because you were mentioned.Message ID: @.***>

engcom-Dash commented 1 year ago

@magento give me 2.4-develop instance

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering Admin access: https://dc80655f5360dd7682c77147db29cbeb.instances-prod.magento-community.engineering/admin_3a1f Login: d200a732 Password: e51ec3b64b24

engcom-Dash commented 1 year ago

Hi @harrigo Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is reproducible. In ipad mini the menu and header loads as mobile, instead they should load as desktop. Confirming the issue. Please refer the video recording.

https://github.com/magento/magento2/assets/60198592/2d64c330-6b47-479b-9c63-0aa6439190b1

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9606 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

amcguireweb commented 8 months ago

So glad all of our sites now have a one pixel discrepancy, what a mess. Why???

amcguireweb commented 6 months ago

I received a patch for this a couple of days ago from Adobe support. Only took 2 months to get.

ACSD-58442_2.4.6-p3.patch