Closed (fixed)
Project:
Drupal core
Version:
9.1.x-dev
Component:
views_ui.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Jul 2020 at 09:10 UTC
Updated:
28 Dec 2020 at 11:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
mirakolous commentedI have added a patch that fixes this issue. Although the redrawing function was run and filtering out hidden table rows, it was running before the table row was removed. Re-adjusting the order of these functions resolves this issue.
Comment #3
mirakolous commentedComment #4
mirakolous commentedSee if this test passes
Comment #5
lauriiiThank you for working on this! I'm wondering if we have some pre-existing test coverage which we could extend easily to add coverage for this?
Comment #6
kndrI found the pre-existing test coverage I made use of. I also realized this bug appears very early - right after clicking on 'Remove' at the last filter (look at the attached screencast) so there was no need to test rearranging filters with drag-and-drop. The #4 patch works for me so I extended it with the test only.
Comment #7
kndrThe interdiff for the record.
Comment #9
abhijith s commentedThe patch #6 is working fine.The operator will be gone after removing last item.Including screen recording below after applying the patch:

RTBC
Comment #10
tanubansal commentedTested #4 on 9.1. Its working fine
RTBC +1
Comment #11
lendudeNice work on this.
Can we add an assertion that the label is present before we remove the last row, that way we are actually testing for a change. Currently the test would also be green if the label was never there to begin with.
Comment #12
kndrYou are right, Lendude. Here is the new test and the patch.
Comment #15
kndrThe test is green again.
Comment #17
ranjith_kumar_k_u commentedThe patch #12 is working fine on drupal 9.2.dev
. RTBC
before patch
after patch
Comment #18
ranjith_kumar_k_u commentedRe-rolled for 9.2.x-dev
Comment #19
lendude@ranjith_kumar_k_u why reroll? It was applying fine to 9.2.x ¯\_(ツ)_/¯
Tests are looking great now. Bit of nitpicking:
This isn't needed. People can just git blame
This isn't used
Maybe just using array_pop() twice would make this a little easier to read? Dunno, this works to, but not that easy to read.
Comment #20
anmolgoyal74 commentedAddressed #19.
Comment #22
kndrLet's try this one.
Comment #23
kndrComment #25
kndrHere is an interdiff I forgot to attach.
Comment #26
kndrI'm changing the status to "Needs review" because a "test-only" patch failed and it changed the status to "Needs work". A complete patch #22 is green and ready to review. The issue meets the requirements of Bug Smash Initiative so I added a relevant tag as well.
Comment #27
paulocsComment #28
paulocsI reviewed patch #22 and it looks to me. It addresses what @Lendude pointed on comment #19.
Tests looks good and well documented.
I attached a gif to confirm that I tested the functionality and that it is working.
@kndr next time you can attach the test patch first and then the complete patch so issue status will not change to "needs work" (just a small tip ;) ).
Comment #29
lauriiiCommitted 22c3d04 and pushed to 9.2.x. Thanks!
Leaving open for backport to 9.1.x.
Comment #32
lauriiiDiscussed with @alexpott and we agreed to backport this to 9.1.x.