Skip to content

FIX: blocky moving inside magnifier #29077

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

Merged
merged 1 commit into from
Jul 23, 2020
Merged

FIX: blocky moving inside magnifier #29077

merged 1 commit into from
Jul 23, 2020

Conversation

GrimLink
Copy link
Member

Description (*)

This fixes the blocky movement when using the magnifier with the mode set to inside.
The move function is part of and if statement where 1 of the conditions was only for the magnifier mode outside.

This bug was created in the commit 3d34a3c

Related Pull Requests

None

Fixed Issues (if relevant)

Fixes #29076.

Manual testing scenarios (*)

  1. Copy the lib/web/magnifier/magnifier.js to you theme
  2. Change the if statement found on line number 580

from:

if (inBounds && isOverThumb && gMode === 'outside') {
     $magnifierPreview.removeClass(MagnifyCls.magnifyHidden);
     move();
 }

to:

if (inBounds && isOverThumb) {
     if (gMode === 'outside') {
         $magnifierPreview.removeClass(MagnifyCls.magnifyHidden);
     }
     move();
 }

Questions or comments

None

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 Jul 10, 2020

Hi @GrimLink. 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

@GrimLink
Copy link
Member Author

@magento run all tests

@GrimLink GrimLink changed the title FIX: blocky moving inside magnifier #29076 FIX: blocky moving inside magnifier Jul 10, 2020
@ptylek
Copy link
Contributor

ptylek commented Jul 11, 2020

Seems that failing functional tests are not related to this PR. Nice find. Has to be tested manually.

@ghost ghost assigned ptylek Jul 11, 2020
@ptylek ptylek added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Progress: pending review Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. and removed Progress: ready for testing labels Jul 11, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ptylek, thank you for the review.
ENGCOM-7826 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Preconditions:

  1. Magento 2.4-develop;
  2. Sample Data;

Manual testing scenario:

  1. In the view.xml for any theme. ( luma in this case)
    app/design/frontend/Magento/luma/etc/view.xml
    Enable the magnifier and set the mode to inside.
<var name="magnifier">
  <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
  <var name="mode">inside</var> <!-- Zoom type (outside/inside) -->
</var>
  1. Clean cache;
  2. Go to any product page in Storefront;

Before: ✖️ Blocky movement as seen on this image.

Peek 2020-07-14 12-55

After: ✔️ A smooth movement.
Where the magnifier moves with the mouse cursor.

Peek 2020-07-14 13-14

Checked and on the Blank theme:

Actual Result: ✔️ A smooth movement.

Peek 2020-07-14 13-40

Also, was checked if the mode is outside:

<var name="magnifier">
  <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
  <var name="mode">outside</var> <!-- Zoom type (outside/inside) -->
</var>

Actual Result: ✔️ A smooth movement.

Peek 2020-07-14 13-23

@engcom-Kilo engcom-Kilo self-assigned this Jul 14, 2020
@engcom-Kilo engcom-Kilo added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Jul 14, 2020
@ghost ghost added the Priority: P3 May be fixed according to the position in the backlog. label Jul 16, 2020
@engcom-Alfa engcom-Alfa added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jul 22, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 23, 2020

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

@GrimLink GrimLink deleted the bugfix/inside-magnifier branch July 23, 2020 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Lib/Frontend Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Priority: P3 May be fixed according to the position in the backlog. Progress: accept 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
Archived in project
Development

Successfully merging this pull request may close these issues.

Gallery inside magnifier moves blocky
5 participants