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

[Issue] Remove over complicated setup for closing minicart dropdown #29161

Closed
4 tasks done
m2-assistant bot opened this issue Jul 15, 2020 · 3 comments · Fixed by #28906
Closed
4 tasks done

[Issue] Remove over complicated setup for closing minicart dropdown #29161

m2-assistant bot opened this issue Jul 15, 2020 · 3 comments · Fixed by #28906
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Jul 15, 2020

This issue is automatically created based on existing pull request: #28906: Remove over complicated setup for closing minicart dropdown


Summary (*)

Magento 2.4-develop
When investigating minicart code I've noticed a bit strange way to add event listener to elements that are supposed to close minicart when clicked.

Please first look on removed line with data-bind="visible: closeSidebar()". visible knockout binding is used to control whether the element should be shown. However, the closeSidebar function is always returning true value. The side effect of this function is it setup an event listeners to [data-action="close"] elements, which will close the minicart dropdown.

This pull request removes closeSidebar function and the knockout binding on completely unrelated element. Instead, the appropriate click binding is added to the only [data-action="close"] element I've found.

Examples (*)

  1. Open minibasket
  2. Close with an "X" button
  3. Add a product to basket
  4. Open, close minibasket
  5. Open basket and click on "Proceed to Checkout"

Proposed solution

Questions or comments

I've searched the codebase for elements with data-action="close" to ensure that it will not break any other functionality. However I'm guessing some modules may using this "API".

Other question is whether data-action="close" attribute is needed. By searching in a code it doesn't seem to have a purpose, but it increase HTML to content ratio.

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 m2-assistant bot added Component: Checkout Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Jul 15, 2020
@ghost ghost added this to Ready for QA in Community Backlog Jul 15, 2020
@ghost ghost moved this from Ready for QA to PR In Progress in Community Backlog Jul 15, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jul 15, 2020
@VladimirZaets VladimirZaets added Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: ready for QA and removed Progress: PR in progress labels Jul 15, 2020
@engcom-Delta engcom-Delta self-assigned this Jul 24, 2020
@m2-assistant
Copy link
Author

m2-assistant bot commented Jul 24, 2020

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Jul 24, 2020
@engcom-Delta engcom-Delta added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jul 24, 2020
@ghost ghost unassigned engcom-Delta Jul 24, 2020
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 24, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Delta
Thank you for verifying the issue. Based on the provided information internal tickets MC-36146 were created

Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jul 29, 2020
@magento-engcom-team
Copy link
Contributor

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #28906 by @lumnn in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.1 release.

@ghost ghost moved this from PR In Progress to Done (last 30 days) in Community Backlog Jul 29, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P4 No current plan to fix. Fixing can be deferred as a logical part of more important work. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants