Skip to content

refactor(ui): remove "Clear all" button from filter pills strip#10481

Merged
Alan-TheGentleman merged 4 commits intomasterfrom
refactor/ui-remove-pills-clear-all-button
Mar 30, 2026
Merged

refactor(ui): remove "Clear all" button from filter pills strip#10481
Alan-TheGentleman merged 4 commits intomasterfrom
refactor/ui-remove-pills-clear-all-button

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Contributor

Context

Simplifies the filter UX by consolidating clear-filter actions into a single entry point — the Clear Filters button in the top bar. The redundant "Clear all" link next to the filter pills is removed.

Description

  • FilterSummaryStrip: removed onClearAll prop and the "Clear all" <button> element
  • FindingsFilters: removed handleClearAllChips, PROVIDER_KEYS set, and clearKeys destructuring
  • useFilterBatch: removed clearKeys function and its type from UseFilterBatchReturn
  • Tests: removed 6 clearKeys tests from hook test file, removed onClearAll test block and all prop references from strip test file

No new functionality — pure removal of dead code path.

Steps to review

  1. Verify FilterSummaryStrip renders chips with X buttons but no "Clear all" link
  2. Verify the top-bar Clear Filters (N) button still works via clearAndApply
  3. Run pnpm vitest run components/filters/filter-summary-strip.test.tsx hooks/use-filter-batch.test.ts — 36 tests pass

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack
  • Are there new checks included in this PR? No
  • Review if the code is being covered by tests.
  • Review if backport is needed.
  • Review if is needed to change the Readme.md

UI (if applicable)

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video - Mobile (X < 640px)
  • Screenshots/Video - Tablet (640px > X < 1024px)
  • Screenshots/Video - Desktop (X > 1024px)
  • Ensure new entries are added to ui/CHANGELOG.md

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

🔒 Container Security Scan

Image: prowler-ui:61175e3
Last scan: 2026-03-30 09:24:37 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

@Alan-TheGentleman Alan-TheGentleman requested a review from a team as a code owner March 26, 2026 12:16
Copy link
Copy Markdown
Contributor

@alejandrobailo alejandrobailo left a comment

Choose a reason for hiding this comment

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

Nice cleanup! The "Clear all" removal and clearKeys dead-code deletion look good.

One thing to address before merging: the chips in FilterSummaryStrip are using Badge variant="outline", but they should use variant="tag" — that's the variant we use across the app for this kind of removable chip (multiselects, search chips, table tags, etc.). Since this PR is already touching this component, it'd be a good moment to fix it for consistency.

- <Badge variant="outline" className="flex items-center gap-1 pr-1">
+ <Badge variant="tag" className="flex items-center gap-1 pr-1">

@alejandrobailo alejandrobailo self-requested a review March 27, 2026 11:18
alejandrobailo
alejandrobailo previously approved these changes Mar 27, 2026
The only clear-filters action is now the ClearFiltersButton in the
top bar. This removes the redundant "Clear all" link next to the
pills, along with the clearKeys helper in useFilterBatch and all
related tests.
clearAll had no callers after the "Clear all" button removal.
This removes the function, its interface type, and its 5 tests.
Also rewrites clearAndApply JSDoc to stand alone.
Addresses PR review: Badge variant in FilterSummaryStrip changed
from "outline" to "tag" for consistency with the rest of the app.
@Alan-TheGentleman Alan-TheGentleman force-pushed the refactor/ui-remove-pills-clear-all-button branch from f2891dc to 8d7736c Compare March 30, 2026 09:20
@Alan-TheGentleman Alan-TheGentleman merged commit 6df7452 into master Mar 30, 2026
36 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the refactor/ui-remove-pills-clear-all-button branch March 30, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants