[O2B-1558] Set filters from url upon page reload#2144
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2144 +/- ##
==========================================
- Coverage 45.88% 45.80% -0.09%
==========================================
Files 1035 1035
Lines 17165 17195 +30
Branches 3123 3132 +9
==========================================
Hits 7877 7877
- Misses 9288 9318 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
82c8d41 to
e157e08
Compare
beca3c1 to
319bb4d
Compare
767f763 to
6add680
Compare
6add680 to
d23795c
Compare
There was a problem hiding this comment.
Comment for general description of the PR, it does more than what you mention:
- changes the use of textInput component
- changes EOR
- adds the logger
Comments for the logger - as you are introducing lots of duplicated code, I belive this would be better to be added as a middleware method and separate ticket
Comment for the call to set from URL. Could this not be added in a common space, perhaps something like in the setter of pageIdentifier?
| */ | ||
| const listDataPassesHandler = async (req, res) => { | ||
| const { path, session: { id }, query } = req; | ||
| const filters = query?.filters; |
There was a problem hiding this comment.
I believe it is filter without the s
There was a problem hiding this comment.
You're right
| } | ||
| } | ||
|
|
||
| module.exports = new FilterLogger; |
There was a problem hiding this comment.
I believe I identified a bug that needs to be taken care of:
- open a summary page (let's say logs)
- set a filter (let's say "No Anonymous")
- pages succesfully gets updated and the URL as well
- use the browser "Go Back" navigation button
- URL gets updated but the request towards the backend will still contain the filter applied
When fixing the test, please add a test for this scenario as well
| * @param {boolean} resetUrl Whether to remove all the active filters from the urls | ||
| * @return {void} | ||
| */ | ||
| resetFiltering(fetch = true, clearUrl = false) { |
There was a problem hiding this comment.
I think you updated the docs from the other file similar changes, but you did not apply the change to the implementaiton
I have a JIRA ticket
Notable changes for users:
Notable changes for developers:
Changes made to the database: