Sync analytics dashboard filters with URL params
What does this MR do and why?
Updates customized dashboards with the option to synchronise the filters with the URL parameters and turns it on for analytics dashboards.
This also updates the shared UrlSync
component with the option to use History.replaceState()
.
Related issue: Filters for Dashboards - Daterange (#377817 - closed) and Sync analytics dashboard filters with URL params (#391595 - closed).
Screenshots or screen recordings
No visual change.
Kapture_2023-02-14_at_11.07.06
How to set up and validate locally
Please follow the instructions at https://gitlab.com/gitlab-org/gitlab/-/snippets/2474959 to enable Product Analytics on your GDK.
With the Product Analytics feature enabled:
- Go to
/gitlab-org/gitlab-shell/-/product_analytics/dashboards
or any other instrumented project. - Use the date range dropdown and validate that it updates the URL and that reloading the page retains the selected date filter.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #391595 (closed).