ui: Extend useURLState and useQueryState hooks#6138
Conversation
|
✅ Meticulous spotted 0 visual differences across 328 screens tested: view results. Meticulous evaluated ~4 hours of user flows against your PR. Expected differences? Click here. Last updated for commit ed555b9. This comment will update as new commits are pushed. |
| const result = encodeProfileFilters(value); | ||
| return result; | ||
| }, | ||
| mergeStrategy: 'preserve-existing', |
There was a problem hiding this comment.
Is it possible to apply the mergeStrategy in this component and pass the final value into the URLState?
Adding that functionality into the URL State might complicate things a lot.
f605253 to
1c1f139
Compare
491c914 to
a60cdfe
Compare
a60cdfe to
49bd403
Compare
49bd403 to
d2b86db
Compare
This PR refactors the URL state hooks to export raw setters that external wrapper hooks can use. Changes: - useQueryState: Exports raw URL setters (setExpressionParam, setSumByParam, setGroupByParam) for external wrapper hooks - useProfileFilters: Exports setAppliedFilters for wrapper hooks
d2b86db to
1babb57
Compare
| dispatch(setAutoQuery('true')); | ||
| let profileType = profileTypesData.types.find( | ||
| type => type.name === 'parca_agent' && type.delta | ||
| type => type.name === 'parca_agent' && type.sampleType === 'samples' && type.delta |
There was a problem hiding this comment.
Try to pick On-CPU when auto querying. Noticed this upstream where it inconsistently chooses Off-CPU before On-CPU even though the logic defined here says we prioritize On-CPU
There was a problem hiding this comment.
Added tests for the useProfileFiltersUrlState.ts hook
This PR refactors the URL state hooks to export raw setters that external wrapper hooks can use.
Changes: