-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Backport] Add class into image builder #18864
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
[Backport] Add class into image builder #18864
Conversation
Hi @gelanivishal. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @gelanivishal , changes in original PR are completely different and can't be ported automatically. |
@sidolov Please check now. |
@@ -0,0 +1,179 @@ | |||
<?php |
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.
It's not a good idea to port the whole class and use only one method. Please, consider to provide different implementation compatible with 2.2-develop.
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.
Disagree with that. @sidolov why we need to reinvent the wheel?
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.
I'm not sure if this new class is actually used though.
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.
@orlangur I agree that we shouldn't implement completely new solution, but introducing code that never used not a good idea. We should port only the fragments that resolves the problem
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.
@sidolov but it requires more efforts and make codebase 2.2/2.3 less consistent. I see your point but as for me some unused code is lesser evil.
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.
@orlangur it's pretty simple, for 2.2 we need just one method from 2.3 version. We trying to introduce new code that will be marked as unused and deprecated
@@ -1,319 +0,0 @@ | |||
<?php |
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.
We can't remove attribute repository according to our Backward Compatible Development Guide
@@ -1,212 +0,0 @@ | |||
<?php |
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.
No, you cannot just remove a test.
Closing due to inactivity. Feel free to reach me out anytime later if you wish to continue work on this pull request and it will be reopened. |
Original PR
#18388
Description
Currently, the product image has an hardcoded class
product-image-photo
which can't be overriden when using the$attributes
parameter of theimageBuilder->create()
function.Manual testing scenarios
=> The
img
tag hasmy-custom-class
as class.=> The
img
tag hasproduct-image-photo
as class.The aim here is to allow customization without breaking the default value.
I'm open to discussion about how to deal with this!
Contribution checklist