Skip to content

[dataquery] Clear filters btn - #11008

Closed
marandmart wants to merge 4 commits into
aces:29.0-releasefrom
marandmart:dataquery_clear_filters_btn
Closed

[dataquery] Clear filters btn#11008
marandmart wants to merge 4 commits into
aces:29.0-releasefrom
marandmart:dataquery_clear_filters_btn

Conversation

@marandmart

Copy link
Copy Markdown
Contributor

Brief summary of changes

Adds a "Remove all filters" button to the DQT filter step, allowing users to remove all chosen filters with a single action instead of deleting each filter individually. The users are prompted to confirm action to avoid issues with accidental clicks of the button.

Change preview

Screenshot 2026-07-23 at 11 45 52 AM Screenshot 2026-07-23 at 11 49 42 AM

Testing instructions

  • Open the Data Query module and navigate to the filter editor.
  • Add multiple filters.
  • Click the Clear Filters button.
  • Verify that all filters are removed.
  • Confirm that other unsaved selections (e.g. fields and visits) remain unchanged.
  • Verify that new filters can be added normally after clearing.

Link(s) to related issue(s)

Resolves #10634

@github-actions github-actions Bot added Module: dataquery PR or issue related to (new) dataquery module Multilingual Any tasks related to making LORIS multilingual labels Jul 24, 2026
@HenriRabalais

Copy link
Copy Markdown
Collaborator

Tested this on RaisinBread and it works well.

Checked both places the button renders. With a single filter it sits to the right of the "and"/"or" condition buttons, and with two filters it shows up in the query tree next to "Add and condition to group". Confirming clears everything and the match count goes back to the full set, cancelling leaves the filters alone, and there is no button when no filters have been added yet. Translations are in for all four languages.

One non blocking thing: the confirm dialog does not set focusCancel, so "Yes" is the focused button when the modal opens and hitting enter clears the filters. Nothing else in the repo sets it either, so this is not really on you, but it is the same pattern as #10306 which is open against the dataquery "Are you sure" modal. Might be worth adding focusCancel: true here so that issue has one less spot to fix, or just leaving it to be dealt with there.

@HenriRabalais HenriRabalais added the Passed manual tests PR has been successfully tested by at least one peer label Jul 28, 2026
@driusan

driusan commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

@marandmart This is a new feature, can you change the PR to the main branch?

@marandmart

Copy link
Copy Markdown
Contributor Author

@HenriRabalais Closing this PR in favour of a new one based on the latest main branch. I applied the focusCancel: true there. The new PR is here: #11096

@marandmart marandmart closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module: dataquery PR or issue related to (new) dataquery module Multilingual Any tasks related to making LORIS multilingual Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants