Explore Profiles is a native Grafana application designed to integrate seamlessly with Pyroscope, the open-source continuous profiling platform, providing a smooth, query-less experience for browsing and analyzing profiling data.
Before this PR, the URL search parameters were not correctly picked up after being updated.
We can see this issue in the "Diff flame graph" view when the default maxNodes is not present in the URL. In this case, its value is determined by fetching the user settings, which takes some time. And because the useUrlSearchParams hook was not forcing a re-render after setting the new value, the component would never display the flame graph.
๐ Summary of the changes
useUrlSearchParams now relies on the useLocation hook from react-router-dom. As a result, the E2E tests related to the "Diff flame graph" view have now the correct screenshots (the incorrect screenshot should never have been pushed to the repo in the first place - shame on me ๐คฆ๐พโโ๏ธ).
โจ Description
Related issue(s):
-
Before this PR, the URL search parameters were not correctly picked up after being updated.
We can see this issue in the "Diff flame graph" view when the default
maxNodes
is not present in the URL. In this case, its value is determined by fetching the user settings, which takes some time. And because theuseUrlSearchParams
hook was not forcing a re-render after setting the new value, the component would never display the flame graph.๐ Summary of the changes
useUrlSearchParams
now relies on theuseLocation
hook fromreact-router-dom
. As a result, the E2E tests related to the "Diff flame graph" view have now the correct screenshots (the incorrect screenshot should never have been pushed to the repo in the first place - shame on me ๐คฆ๐พโโ๏ธ).See diff tab for specific comments.
๐งช How to test?