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

Fixed grid multiselect issue #24400 #26488

Closed
wants to merge 21 commits into from

Conversation

mahesh-rajawat
Copy link
Member

@mahesh-rajawat mahesh-rajawat commented Jan 22, 2020

Grid Multi-Select Column Issue Fixed in this PR

Description (*)

Fixed issues related to multi-select column.

Fixed Issues (if relevant)

  1. UI Component grid indicates a wrong number of selections when removing keyword search #24348

Manual testing scenarios (*)

  1. All the steps verified that given in the issue Issues Found on Grid Multi-Select Column #24400
  2. ...

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)

@m2-assistant
Copy link

m2-assistant bot commented Jan 22, 2020

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

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

@novikor novikor self-assigned this Jan 22, 2020
@novikor
Copy link
Contributor

novikor commented Jan 23, 2020

@magento run Static Tests

@novikor novikor self-requested a review January 23, 2020 14:31
Copy link
Contributor

@novikor novikor left a comment

Choose a reason for hiding this comment

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

Hi, @maheshWebkul721 . Thank you for your contribution.
Please fix the static tests.
Currently, build error is not available, however, I have the problem description:

Stacktrace
disallowTrailingWhitespace: Illegal trailing whitespace at app/code/Magento/Ui/view/base/web/js/grid/columns/multiselect.js :
   238 |            var total = this.getIds().length,
   239 |                selected = this.getPageSelections().length;
   240 |            
--------^
   241 |            if (this.isPageSelected() && selected !== total) {
   242 |                return this.selectPage();

@slavvka
Copy link
Member

slavvka commented Jan 23, 2020

Guys, thank you for the identification of the issue. We are working on fixing that.

@slavvka
Copy link
Member

slavvka commented Jan 23, 2020

Full issue log:

disallowTrailingWhitespace: Illegal trailing whitespace at app/code/Magento/Ui/view/base/web/js/grid/columns/multiselect.js :
   238 |            var total = this.getIds().length,
   239 |                selected = this.getPageSelections().length;
   240 |            
--------^
   241 |            if (this.isPageSelected() && selected !== total) {
   242 |                return this.selectPage();


requirePaddingNewlinesBeforeKeywords: Keyword `return` should have an empty line above it at app/code/Magento/Ui/view/base/web/js/grid/columns/multiselect.js :
   245 |            if (this.indetermine() && selected === total) {
   246 |                return this.selectPage();
   247 |            }
---------------------^
   248 |            return this.isPageSelected() ? this.deselectPage() : this.selectPage();
   249 |        },


disallowTrailingWhitespace: Illegal trailing whitespace at app/code/Magento/Ui/view/base/web/js/grid/columns/multiselect.js :
   461 |            this.allSelected(allSelected);
   462 |            this.indetermine(totalSelected && !allSelected);
   463 |            
--------^
   464 |            return this;
   465 |        },

@slavvka
Copy link
Member

slavvka commented Jan 27, 2020

@shikhamis11
Copy link
Member

Hi
I have also provided solution for above issue in my pull request #26626
Please have a look

novikor
novikor previously approved these changes Feb 20, 2020
@magento-engcom-team
Copy link
Contributor

Hi @novikor, thank you for the review.
ENGCOM-6944 has been created to process this Pull Request
✳️ @novikor, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@novikor
Copy link
Contributor

novikor commented Feb 20, 2020

Hi, @maheshWebkul721
Thank you for your contribution.
The PR changes are ready for approval, but tests coverage is required.
Don't you mind to cover the PR by MFTF?
@engcom-Delta

sidolov
sidolov previously approved these changes Aug 19, 2020
@ghost ghost moved this from Review in Progress to Ready for Testing in Pull Requests Dashboard Aug 19, 2020
@ghost ghost assigned sidolov Aug 19, 2020
@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Aug 20, 2020
@engcom-Alfa
Copy link
Contributor

@magento give me test instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

Hi @engcom-Alfa, here is your new Magento instance.
Admin access: https://pr-26488.instances.magento-community.engineering/admin_8e78
Login: 3ad7d9a1 Password: c71d52aedf26
Instance will be terminated in up to 3 hours.

Copy link
Contributor

@engcom-Alfa engcom-Alfa left a comment

Choose a reason for hiding this comment

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

Hi @maheshWebkul721 .

During testing, we faced the issue.

Manual testing scenario:

  1. Login to the backend;

  2. Create 3 customers (first name, second name, third name);
    Screenshot from 2020-08-20 13-29-36

  3. In the 'Search by keyword' box, enter 'first' and search;

  4. In the first column, choose the 'Select All' option;

  5. Notice that one record is selected:

2020-08-20_13-31

  1. Remove the 'first' keyword search by pressing the 'x' icon to the right of it.
  2. Notice that it now says that one record is selected,

✖️ but visually all records have a checkmark:

2020-08-20_13-33

  1. Select Actions => Delete;

  2. Notice that it says it will remove 1 record:
    2020-08-20_13-36

  3. Press OK

Actual Result: ✖️ All products have been removed instead of 1.

2020-08-20_13-38

@maheshWebkul721 Could you take a look?

Thanks!

@ghost ghost moved this from Testing in Progress to Changes Requested in Pull Requests Dashboard Aug 20, 2020
@ghost ghost dismissed sidolov’s stale review August 20, 2020 10:39

Pull Request state was updated. Re-review required.

@engcom-Hotel engcom-Hotel self-assigned this Sep 4, 2020
@engcom-Hotel
Copy link
Contributor

@magento run all tests

@gabrieldagama
Copy link
Contributor

@magento run all test

@sivaschenko
Copy link
Member

@magento run all tests

@gabrieldagama
Copy link
Contributor

Hi @maheshWebkul721, thanks for your contribution. After looking at the issue and the possible solutions we've decided to proceed with this PR #29968 that aims to fix the same issue.

The approach that was chosen was to preserve the same behavior that we have with filters. So when a search tag is removed from filters the previous selection becomes invalid and it is dismissed. As result, we have the same behavior across multiple functionalities on the grid.

I will be closing this PR but feel free to reopen it anytime.

@m2-assistant
Copy link

m2-assistant bot commented Sep 15, 2020

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

@ghost ghost removed this from Changes Requested in Pull Requests Dashboard Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Ui Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: needs update Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet