-
Notifications
You must be signed in to change notification settings - Fork 93
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
Persist Column Filters in URL (#765) #783
Conversation
✅ Deploy Preview for mozilla-perfcompare ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #783 +/- ##
==========================================
- Coverage 91.46% 91.44% -0.02%
==========================================
Files 88 88
Lines 2332 2350 +18
Branches 434 438 +4
==========================================
+ Hits 2133 2149 +16
- Misses 176 178 +2
Partials 23 23 ☔ View full report in Codecov by Sentry. |
Hi, I just wanted to mention that the tests were passing in the first pull request. But after refactoring my code, the tests started failing, even though all tests passed locally in VS Code. I’ll investigate further. Thanks. |
Hi! I'll help you investigate this tomorrow! Thanks for your patience. |
Thank you for your help. I think the easiest and cleanest way would be to create a new branch and submit a fresh pull request after deleting the current one. However, I would like to wait for your review on my existing code and get your permission before proceeding with this approach. 😀 |
@ST-KO Hi there! Thanks for your detailed PR. Before I jump into your code, I highly recommend creating unique descriptions for your commit messages. They are all the same so I have very little idea what to expect in the commits. Could you please go ahead and create a fresh PR with amended commit messages? That would help a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments!
Hi @Carla-Moz, Thank you for your feedback, and I apologise for not providing clear and unique commit messages earlier. I have now created a fresh pull request #788 for your review. Looking forward to your feedback. Additionally, please let me know if I should close this pull request. Thank you. |
Closing due to updated PR #788 |
Overview:
This pull request implements functionality to persist column filters in the URL. Users can now refresh the page and maintain their selected filters, improving the overall user experience. This fixes issue #765.
Changes Made:
Implemented the useEffect hook that reads the filter parameters from the URL when the component mounts, ensuring that the selected filters are applied even after a page refresh.
Screen.Recording.2024-10-11.at.12.09.41.pm.mov
dc1650f7-f58e-634f-a372-a774b157e808_custom.mp4
Update the URL with the applied filters in the existing onToggleFilter method, allowing users to share the URL and they will see the same filtered results.
Screen.Recording.2024-10-11.at.12.22.10.pm.mov
Screen.Recording.2024-10-11.at.3.22.00.am.mov
This functionality is implemented in the existing onToggleFilter and onClearFilter methods, where parameters are dynamically added or deleted. I utilised the existing useRawSearchParams custom hook to prevent unnecessary page re-rendering. This ensures that the URL dynamically updates as filters are added or removed.
Screen.Recording.2024-10-11.at.12.25.17.pm.mov
2ffb5282-addc-cbca-8c6e-7ba903cc918a_custom.mp4