Skip to content

Save dehydrated dashboard object to the correct location

What does this MR do and why?

Refactors the saving mechanism for the analytics dashboards component:

  • Save to correct location in the custom dashboards repository
  • Remove dashboard.default state
  • Update Apollo cache after saving changes to the dashboard

Fixes some small issues I noticed after refactoring:

  • Crash when redirecting, after saving a new dashboard with no panels
  • Editing was not available for new dashboards after saving them until refreshed
  • Editing was incorrectly available for Audience and Behaviour dashboards

Note: This feature is experimental and not intended for users. It is hidden behind multiple default off feature flags.

Screenshots or screen recordings

No visual differences other than things which were previously not working with Snowplow now working

saving-dashboards

How to set up and validate locally

  1. Follow these instructions to setup Product Analytics in GDK. Ensure product_analytics_snowplow_support feature flag is enabled
  2. Create a project and onboard it from Project -> Analyze -> Application Analytics -> Product Analytics
  3. Verify built in dashboards display correctly, and cannot be edited
  4. Verify custom dashboards display correctly, and can be edited
  5. Verify "Code" button displays correct code when editing dashboards
  6. Verify creating a new dashboard works as intended and redirects you to the new dashboard after creating. New dashboards should appear in the dashboard list when clicking "Go back".

Note that selecting a built-in Jitsu visualization when creating or editing dashboards puts things into a broken state. Be sure to create a new custom Snowplow visualization for testing.

Note: snowplow compatible visualizations won't load correctly without Update analytics dashboard available visualizat... (!125278 - merged) Note: custom visualizations won't load correctly without [Dashboard designer] Custom visualizations not ... (#416962 - closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #414283 (closed)

Edited by Elwyn Benson

Merge request reports

Loading