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
How to set up and validate locally
- Follow these instructions to setup Product Analytics in GDK. Ensure
product_analytics_snowplow_support
feature flag is enabled - Create a project and onboard it from Project -> Analyze -> Application Analytics -> Product Analytics
- Verify built in dashboards display correctly, and cannot be edited
- Verify custom dashboards display correctly, and can be edited
- Verify "Code" button displays correct code when editing dashboards
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #414283 (closed)