-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix(GlobalFilters): RHINENG-6296 push correct params to url #1185
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1185 +/- ##
==========================================
+ Coverage 64.01% 64.04% +0.02%
==========================================
Files 124 124
Lines 3235 3243 +8
Branches 831 833 +2
==========================================
+ Hits 2071 2077 +6
- Misses 1164 1166 +2 ☔ View full report in Codecov by Sentry. |
@@ -27,9 +27,11 @@ const initStore = (state) => { | |||
return mockStore(state); | |||
}; | |||
|
|||
const apply = () => {}; |
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.
Explain.
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.
Since apply
is now used inside the SystemsTable
(before, it was just passed along to other functions), the tests fail if apply
is undefined. thus i'm just passing a plain function into the component
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.
We will need to make this work even when no apply
is provided.
Can you elaborate a bit more on what the issue was? |
basically, |
@xmicha82 This doesn't feel like a fix, but a work around. We should also not need this |
@bastilian this change is consistent with other pages in patch, which also use the |
@xmicha82 I took a quick look at this. I used const location = useLocation();
console.log('LOCATION CHANGE', location); Here is what I saw: patch_global_filter.mp4If you pay attention to the console you will notice that, first of all, there are probably updates to the URL multiple times per render and re renders, and if you look that location after the global filter is set you'll see that at some point the A proper fix for this issue will require us to take a closer look and see why, how and where changes to the URL happen when the Ideally we would also look into reducing the amount of updates to just one update to the URL per filter change, but for now just making sure that the global filter hash is not lost should be fix enough. |
A better place to start debugging might be the const setSearchParams = (...args) => {
console.log('SetSearch', ...args);
setSearchParamsOrig(...args);
};
We might need to move those search param changes to use |
e5d9b86
to
d164f1f
Compare
@xmicha82 Have you had time to revise this issue? If you want we can debug this together and see where it starts loosing the |
Description
Associated Jira ticket: # RHINENG-6296
Fixed pushing global filters to URL
How to test the PR
Before the change
After the change
Checklist: