Skip to content

Conversation

@evanyan13
Copy link
Contributor

@evanyan13 evanyan13 commented Sep 6, 2025

Pull Request Checklist

  • I have added or updated TypeScript types for my changes, ensuring they are compatible with the existing codebase.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have made sure my PR is up-to-date with the main branch.

PR Type

  • Feature

Definition of Done

  • Add a clear all filters function to useFilters
  • Add tests

@evanyan13 evanyan13 requested a review from a team September 6, 2025 00:00
@evanyan13 evanyan13 self-assigned this Sep 6, 2025
Copy link
Contributor

@Mudaafi Mudaafi left a comment

Choose a reason for hiding this comment

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

lgtm, just a couple of notes

current: { setFilter, clearFilters },
} = result;

setFilter('Brand', testBrandA);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's include more than one filter for this test. Mind adding a separate test to make sure it doesn't clear other query parameters, Constructor or otherwise, as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @Mudaafi
Thank you for the feedback.
I have added a test that uses useRequestConfigs to check for other query parameters
For your review please!
Thank you!

@evanyan13 evanyan13 merged commit 5dde9fd into main Sep 11, 2025
11 checks passed
@evanyan13 evanyan13 deleted the cdx-190-plp-ui-feature-add-a-function-to-clear-all-filters branch September 11, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants