Show empty state in visualization designer when project not correctly configured
Problem to solve
When a project is not in a valid state (product analytics has not yet been onboarded, or customDashboardsPointerProject is null) we hide the Visualization Designer button on the dashboard list. However, you can still browse directly to the URL for it, bypassing this check.
The viz designer then behaves unexpectedly, either failing to get cube data (if PA not onboarded), or crashing when saving.
Proposed solution
Have the same logic which decides if the button should be visible or not run inside the viz designer. If the button should not render, then the viz designer itself should not render (or, should render an empty state or 404)
Implementation plan
- Pull
showVizDesignerButton
out of dashboard_list into somewhere reusable, and inject in asvizualizationDesignerAvailable
- Inject this into visualization_designer component
- When true, show gl-empty-state, with a link to the product analytics onboarding docs
- Update tests