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

✨ #635 - feat: method to clear filters #642

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

Xaohs
Copy link
Contributor

@Xaohs Xaohs commented Jan 23, 2025

closes #635

@Xaohs Xaohs requested a review from svenvandescheur January 23, 2025 14:32
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.97%. Comparing base (93ff844) to head (709ecb5).
Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/hooks/useFields.ts 76.19% 5 Missing ⚠️
...rc/pages/destructionlist/abstract/BaseListView.tsx 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #642      +/-   ##
==========================================
+ Coverage   88.16%   89.97%   +1.80%     
==========================================
  Files         210      210              
  Lines        6043     6116      +73     
  Branches      639      647       +8     
==========================================
+ Hits         5328     5503     +175     
+ Misses        715      613     -102     
Flag Coverage Δ
backend 91.53% <ø> (+0.13%) ⬆️
jest 33.02% <61.53%> (+0.21%) ⬆️
storybook 85.39% <73.07%> (+6.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@svenvandescheur svenvandescheur left a comment

Choose a reason for hiding this comment

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

Can you also add a test?

@Xaohs Xaohs force-pushed the issue/#635-filter-reset branch from 85ddf0d to 05dd124 Compare January 24, 2025 15:04
@Xaohs Xaohs marked this pull request as ready for review January 24, 2025 15:04
@Xaohs Xaohs requested a review from svenvandescheur January 24, 2025 15:04
Copy link
Contributor

@svenvandescheur svenvandescheur left a comment

Choose a reason for hiding this comment

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

Please have another look, the dat filters seem broken (and don't reset properly as well), also check my comments.

frontend/src/hooks/useFields.ts Outdated Show resolved Hide resolved
frontend/src/hooks/useFields.ts Outdated Show resolved Hide resolved
@Xaohs Xaohs requested a review from svenvandescheur January 28, 2025 13:54
Copy link
Contributor

@svenvandescheur svenvandescheur left a comment

Choose a reason for hiding this comment

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

Looking good, please:

  • Introduce an extension of typedfield with an optional key to keep track of the query parameters to (also) clear.
  • Make the clear button only appear if the selection is active
  • Bonus points: update the test the check if the page is reset

@Xaohs Xaohs requested a review from svenvandescheur January 30, 2025 13:16
@@ -723,6 +723,14 @@ async def page_should_contain_text(self, page, text, timeout=None):
element = page.locator(f"text={text}")
await expect(element.nth(0)).to_be_visible(timeout=timeout)

async def page_should_not_contain_text(self, page, text, timeout=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

await self.then.not_.page_should_contain_text(page, text) probably also works

@Xaohs Xaohs force-pushed the issue/#635-filter-reset branch from 86f4f8e to 709ecb5 Compare January 30, 2025 13:50
@Xaohs Xaohs merged commit 4f0320e into main Jan 30, 2025
13 checks passed
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.

Alle filteropties op een vernietigingslijst in een keer wissen
3 participants