Sync the analytics dashboard scope filter with the URL

What does this MR do and why?

Summary

This change adds support for sharing and bookmarking analytics dashboard URLs with a pre-selected scope (group or project). Previously, if a user selected a scope filter on the dashboard and shared the URL, the recipient would see an unfiltered view. Now, the selected scope is written to the URL as a scope query parameter, and when the page loads with that parameter present, the scope picker automatically restores the previous selection. If the path in the URL no longer exists or isn't accessible, the picker simply starts empty rather than showing an error state. The change also ensures that if a user manually picks something before the initial lookup finishes, their explicit choice takes priority over whatever the URL parameter resolves to.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  • Navigate to Explore > Analytics dashboards
  • Open the DAP Impact dashboard
  • Set the scope via the picker
  • Reload the page and validate that the filter is still set
  • Click another tab and validate that the filter is still set

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #621845

Merge request reports

Loading
Loading