Skip to content
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

[Catalog|MediaStorage] Use theme for image frame param calculation #33439

Closed
wants to merge 4 commits into from

Conversation

Den4ik
Copy link
Contributor

@Den4ik Den4ik commented Jul 8, 2021

Description (*)

This PR replace for #33413 with fixed unit tets
Full description available in issue #19710

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Magento 2.3 images cache generation generates wrong hash for some images with a custom theme that has the keep_frame var set to 0 #19710

Manual testing scenarios (*)

  1. Assign images to products in the catalog.
  2. Set the value of the variable "product_image_white_borders" to 0 in your custom theme view.xml file.
  3. Regenerate product images cache with the CLI command catalog:images:resize.
  4. The product thumbnail in category pages should appear

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jul 8, 2021

Hi @Den4ik. Thank you for your contribution
Here are 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
  13. Semantic Version Checker

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

@Den4ik
Copy link
Contributor Author

Den4ik commented Jul 8, 2021

@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 re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE, Unit Tests

@ihor-sviziev ihor-sviziev self-assigned this Jul 13, 2021
@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 re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@Den4ik I think this PR continues #33413 ?

@Den4ik
Copy link
Contributor Author

Den4ik commented Jul 13, 2021

@ihor-sviziev if #33413 will not be updated soon this PR replace original

@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2B, Unit 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 re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor Author

Den4ik commented Jul 14, 2021

@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 re-request them if they don't show in a reasonable amount of time.

@Den4ik Den4ik marked this pull request as ready for review July 14, 2021 15:35
@Den4ik Den4ik requested a review from ihor-sviziev July 14, 2021 15:38
@Den4ik
Copy link
Contributor Author

Den4ik commented Jul 14, 2021

@magento run Unit 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 re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev ihor-sviziev added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix labels Jul 14, 2021
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-9147 has been created to process this Pull Request

@Den4ik Den4ik added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 25, 2021
@engcom-Charlie engcom-Charlie self-assigned this Aug 11, 2021
@engcom-Charlie
Copy link
Contributor

Hi @Den4ik and @ihor-sviziev,
Thanks for your contribution!!

As its mentioned in one of the comment , I have first tried to reproduce this issue on 2.4 develop branch. I am following below steps:

  1. Setup magento 2.4 develop
  2. Enable the developer mode
  3. Created custom theme and applied to the store
  4. Added few products with images
  5. As a result, On store front, I can see new theme with added products along with images
  6. Set the value of the variable "product_image_white_borders" to 0 in custom theme view.xml file.
  7. Run bin/magento catalog:images:resize command
  8. After all above steps, I can still able to see the catalog product images on store front.

Can you please mention if I am missing any step to reproduce the issue since currently its not reproducible with above steps.

Although I will try to reproduce the issue by upgrading magento framework from mentioned version in issue but it will be helpful if you provide some details on it.

Thank you in advance!

@Den4ik
Copy link
Contributor Author

Den4ik commented Aug 16, 2021

@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 re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor Author

Den4ik commented Aug 16, 2021

I'm close this PR due to themeModel precalculated at https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/View/Asset/Repository.php#L156-L168 and no need pass to param builder

@Den4ik Den4ik closed this Aug 16, 2021
@m2-assistant
Copy link

m2-assistant bot commented Aug 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Component: Catalog Component: MediaStorage Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Release Line: 2.4
Projects
None yet
4 participants