Skip to content

All images height issue #25665

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

Closed

Conversation

abrarpathan19
Copy link
Contributor

@abrarpathan19 abrarpathan19 commented Nov 20, 2019

Description (*)

Fixed Issues (if relevant)

  1. Since 2.3.3 Store logo automatic resize on mobile/smaller displays does not respect aspect ratio #25043: Since 2.3.3 Store logo automatic resize on mobile/smaller displays does not respect aspect ratio

Manual testing scenarios (*)

  1. Magento 2.3.3
  2. Upload images from backend (You can upload logo or images from cms block)
  3. You can able to see the stretching of all Frontend images.

In Magento 2.3.3 latest version there is an image height issue, It was proper working in the previous version so I have done changes as per the previous version.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Nov 20, 2019

Hi @abrarpathan19. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

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

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Nov 20, 2019

@abrarpathan19,
Please sign CLA, otherwise we can't accept your Pull Request.
image

Update: We already have fix for this issue that was already tested: #25623

I'm closing your PR as duplicate.

If you'll have any questions or comments - feed free to write comment and/or re-open this PR.

@ihor-sviziev ihor-sviziev self-assigned this Nov 20, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 20, 2019

Hi @abrarpathan19, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@abrarpathan19 abrarpathan19 reopened this Nov 21, 2019
@ghost ghost unassigned ihor-sviziev Nov 21, 2019
@abrarpathan19
Copy link
Contributor Author

@abrarpathan19,
Please sign CLA, otherwise we can't accept your Pull Request.
image

Update: We already have fix for this issue that was already tested: #25623

I'm closing your PR as duplicate.

If you'll have any questions or comments - feed free to write comment and/or re-open this PR.

@ihor-sviziev

I have signed the CLI.

In Magento 2.3.3 latest version there is an image height issue not even in the logo but entire store images.

The reason behind this PR #25623 is already fixed that I agree but that changes are only for logo, I have fixed that changes for the entire Magento frontend. you can compare my code and his code.

#25623 issue is fixed only for the Logo image. and my changes are for all images which are used in the frontend area in the store

@ihor-sviziev
Copy link
Contributor

Hi @abrarpathan19,
So I believe there should be another steps to reproduce, not related to logo.
Could you describe them?

@abrarpathan19
Copy link
Contributor Author

Hello @ihor-sviziev,

Other images also work the same as the logo image is behaving now. and if we apply my changes we don't need to apply #25623 these changes.

Thanks :)

@krzksz
Copy link
Contributor

krzksz commented Nov 21, 2019

This PR reverts the fix that was done inside d0ad63c, which makes me thing that maybe img should be separated from object, video, embed declaration and applying this change will bring back the bug with videos.

@@ -55,7 +55,7 @@
object,
video,
embed {
max-height: 100%;
height: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in the comment, this change was a part of d0ad63c and reverting it would most probably break something else.

My suggestion would be to split img from this bunch and also remove the style that was added for logo if we can have it globally.

Copy link
Contributor Author

@abrarpathan19 abrarpathan19 Nov 22, 2019

Choose a reason for hiding this comment

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

Hello @krzksz,
Thanks for your suggestions. I have review your comment and agree with the same. As per your suggestion, I have added sperate property for img, please review

@ghost ghost assigned krzksz Nov 21, 2019
@ghost ghost removed the Progress: needs update label Nov 22, 2019
@engcom-Bravo
Copy link
Contributor

Hello @abrarpathan19. Thank You for contribution. Please watch the gifs below:

2.3-develop
dev23

Current PR branch
pr

It is a Product Page being resized. Though I may be wrong, but as to me it looks like the behavior is pretty much the same for both cases. Could You please give us some steps to reproduce following which we would catch the evident difference between the behavior on develop branch and on the one with Your PR. Thank You.

@krzksz
Copy link
Contributor

krzksz commented Nov 24, 2019

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @krzksz. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @krzksz, here is your Magento instance.
Admin access: https://i-25665-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@abrarpathan19
Copy link
Contributor Author

Hello @abrarpathan19. Thank You for contribution. Please watch the gifs below:

2.3-develop
dev23

Current PR branch
pr

It is a Product Page being resized. Though I may be wrong, but as to me it looks like the behavior is pretty much the same for both cases. Could You please give us some steps to reproduce following which we would catch the evident difference between the behavior on develop branch and on the one with Your PR. Thank You.

@engcom-Bravo,

Thanks for the update, Yes, I know the output will be the same but can you please review the CSS style are changed. Before it was fixed only for the logo (luma and Black only). but I have fixed it for entire store images (globally). I have already explained to Mateusz Krzeszowiak.

@krzksz
Copy link
Contributor

krzksz commented Nov 25, 2019

Hey @abrarpathan19, can you give the example of an image in the shop that would be scaled incorrectly without your change? If not, then it means is is not really needed, right?

@abrarpathan19
Copy link
Contributor Author

abrarpathan19 commented Nov 25, 2019

Hey @abrarpathan19, can you give the example of an image in the shop that would be scaled incorrectly without your change? If not, then it means is is not really needed, right?

Hello @krzksz,

Regarding example please review the provided demo from the engcom-Bravo, It is behaving the same in the Current PR branch and 2.3-develop.

In Branch 2.3-develop following issue already merges and it was fixed only for the logo but I have fixed it for the whole store that is why we are removing these changes. whether you upload logos and any images from the admin.
#25623

Thanks

@engcom-Bravo
Copy link
Contributor

@abrarpathan19, Probably I do not entirely understand You, but please take a look at the gifs once more. I intentionally put for a comparison two kinds of image: Logo image and Product Page image. They both behave correctly on the latest develop. Could You please give us an example where image would be resized better with Your PR than it is resized on the current develop version. Thank You.

@gwharton
Copy link
Contributor

The error was first introduced in MAGETWO-59978 d0ad63c#diff-9cc331ae9c8d2d3be0f5607cfd3c570c. It causes ALL images (well possibly all but product images. Try putting an image in the footer instead of using product image, or create a cms page with an image in it. These will all resize incorrectly in 2.3-develop) to be resized incorrectly.

The fix in #25623 only fixed it for the logo images, as that was what the bug reported, e.g Problems resizing logo images.

This PR reverts the changes made in #25623 and re-introduces a new fix for MAGETWO-59978 that only affects video objects, and leaves the styles for img's working correctly.

This PR is the correct resolution IMHO.

@krzksz
Copy link
Contributor

krzksz commented Nov 25, 2019

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @krzksz. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @krzksz, here is your Magento instance.
Admin access: https://i-25665-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@krzksz
Copy link
Contributor

krzksz commented Nov 25, 2019

The error was first introduced in MAGETWO-59978 d0ad63c#diff-9cc331ae9c8d2d3be0f5607cfd3c570c. It causes ALL images (well possibly all but product images. Try putting an image in the footer instead of using product image, or create a cms page with an image in it. These will all resize incorrectly in 2.3-develop) to be resized incorrectly.

The fix in #25623 only fixed it for the logo images, as that was what the bug reported, e.g Problems resizing logo images.

This PR reverts the changes made in #25623 and re-introduces a new fix for MAGETWO-59978 that only affects video objects, and leaves the styles for img's working correctly.

This PR is the correct resolution IMHO.
I totally agree it is a correct fix if the issue can be reproduced anywhere which I am not able to do: https://i-25665-2-3-develop.instances.magento-community.engineering/

For me the result seems correct both for images in CMS pages and static blocks with img styling from 2.3-develop.
obraz
obraz

@abrarpathan19
Copy link
Contributor Author

Hello @krzksz,

Do you need any update from my end?

Abrar

@krzksz
Copy link
Contributor

krzksz commented Dec 2, 2019

Hi @abrarpathan19! Yes, please provide an information which image in which browser is not scaling for you properly without your fix. As you can see above we are struggling to find such image.

@abrarpathan19
Copy link
Contributor Author

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @abrarpathan19. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @abrarpathan19, here is your Magento instance.
Admin access: https://i-25665-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@abrarpathan19
Copy link
Contributor Author

Hi @abrarpathan19! Yes, please provide an information which image in which browser is not scaling for you properly without your fix. As you can see above we are struggling to find such image.

Hello

Please review http://prntscr.com/q4w15r
https://i-25665-2-3-develop.instances.magento-community.engineering/

@krzksz
Copy link
Contributor

krzksz commented Dec 2, 2019

@abrarpathan19 Can you give me any other example then the logo which is fixed on 2.3-develop?

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:12
@VladimirZaets
Copy link
Contributor

@abrarpathan19, I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for collaboration

@m2-assistant
Copy link

m2-assistant bot commented Dec 16, 2019

Hi @abrarpathan19, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@VladimirZaets VladimirZaets self-assigned this Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants