-
Notifications
You must be signed in to change notification settings - Fork 9.4k
#25042 Remove logo dimension parameters from layout files #25789
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
#25042 Remove logo dimension parameters from layout files #25789
Conversation
…blank and luma theme
Hi @mfickers. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
Hello @mfickers, thank you for your contribution. Due to Magento Definition of Done the changes should be covered by tests. Could you please cover your fix by automated tests?
At least by unit test in \Magento\Theme\Test\Unit\Block\Html\Header\LogoTest
.
Thank you!
I've added unit tests for both image dimension getters of the header logo block. |
Hi @dmytro-ch, thank you for the review. |
✔️ QA Passed |
Hi @mfickers, thank you for your contribution! |
Description (*)
This PR fixes a problem where a new logo is uploaded in the backend, without specifying width and height parameters. Magento then used the
logo_img_width
andlogo_img_height
block arguments set in the layout file for the Logo block as fallback, possibly distorting the new logo. This is confusing behavior for the user, as the logo should be displayed with its native dimensions if no width and height parameters are explicitly set.Notice that it is still possible to configure the logo dimension via layout files, using
logo_width
andlogo_height
instead oflogo_img_width
andlogo_img_height
as block arguments. With this changes, thelogo_img_width
andlogo_img_height
block arguments are no longer used by the block.Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)