Skip to content

Fixed conflicting styles for product image container in different listings at the same page #31473

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
wants to merge 24 commits into from

Conversation

tangar76
Copy link

@tangar76 tangar76 commented Dec 28, 2020

Description (*)

This pull requests solves problem when there are two product listing blocks on the same page. Both blocks have at list one common product. And listings have different image sizes for product image.

Related Pull Requests

Can't find related pull requests.

Fixed Issues (if relevant)

Can't find related issue.

Manual testing scenarios (*)

  1. Open product "Crown Summit Backpack" (SKU 24-MB03) to assign up-sell products. Add at list one up-sell product. One of the assigned products must be "Fusion Backpack" (SKU 24-MB02). Save changes.
  2. Create widget "Catalog Product List" via Magento Admin. Assign widget to store view you test. Layout updates settings: display on "Specified page"; page "Catalog Product View"; container "Main Content Top". Widget Options - select at least two product via SKU. One of products must be "Fusion Backpack" (SKU 24-MB02). Save widget.
  3. Clear Magento 2 cache.
  4. Open product page for "Crown Summit Backpack" (SKU 24-MB03) at store front.

image

With old code you can see that "Fusion Backpack" has smaller image than it should.

This pull request fixes it. "Fusion Backpack" will get same size as "Affirm Water Bottle".

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)

Resolved issues:

  1. resolves [Issue] Fixed conflicting styles for product image container in different listings at the same page #31526: Fixed conflicting styles for product image container in different listings at the same page

Resolved issues:

  1. resolves [Issue] Fixed conflicting styles for product image container in different listings at the same page #35372: Fixed conflicting styles for product image container in different listings at the same page

@m2-assistant
Copy link

m2-assistant bot commented Dec 28, 2020

Hi @tangar76. 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.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests 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.

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

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

@m2-assistant
Copy link

m2-assistant bot commented Dec 28, 2020

Hi @tangar76, 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.

@tangar76 tangar76 reopened this Dec 28, 2020
@m2-assistant
Copy link

m2-assistant bot commented Dec 28, 2020

Hi @tangar76. 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.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

@sidolov sidolov added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Jan 4, 2021
@sidolov
Copy link
Contributor

sidolov commented Jan 4, 2021

@magento create issue

@gabrieldagama
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@gabrieldagama gabrieldagama left a comment

Choose a reason for hiding this comment

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

Hi @tangar76, thanks for your contribution! Can you have a look at my comment below?

Also, we must cover all changes with automated tests, probably the most suitable here would be MFTF test.

Thanks!

@@ -10,8 +10,9 @@
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
$width = (int)$block->getWidth();
$paddingBottom = $block->getRatio() * 100;
$containerId = uniqid($block->getProductId());
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we should create a function on Magento\Catalog\Block\Product\Image to generate the containerId instead of adding it to template.

@engcom-Charlie
Copy link
Contributor

Hello @tangar76, Could you please look at #31473 (comment)?
Thank you.

@engcom-Charlie
Copy link
Contributor

Hello @tangar76, please look at #31473 (comment). Otherwise, we can't proceed with your PR.
Thank you.

@tangar76
Copy link
Author

@engcom-Charlie container id logic moved from template to block

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests CE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento give me test instance

@magento-deployment-service
Copy link

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

@magento-deployment-service
Copy link

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

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

@magento-deployment-service
Copy link

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests CE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Charlie
Copy link
Contributor

Hi @tangar76,

There are many failures in the build, it will be helpful if you have a look into them. Can you please check them.

Thank you!

@engcom-Charlie
Copy link
Contributor

Hi @tangar76,

As per above comment, there are too many failures in this PR. Kindly have a look into this. Till then we are closing this PR.

Please feel free to reopen once it get updated or let us know to reopen when you are working on it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Component: Catalog Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: Community Picked PRs upvoted by the community QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet