Replace product analytics dashboard listing with new shared dashboards listing at the project level
Problem to solve
The Dashboards submenu item within the Analytics menu currently points to the Product Analytics dashboards listing. This should point to a more generic Analytics dashboards listing.
Possible solutions
- Move the existing Product Analytics dashboards listing to appear at
/analytics/dashboardsrather than/product_analytics/dashboards.- This will include moving the frontend files to a new folder structure.
- This would maintain the existing dashboards view as we see it now, with the PA onboarding flow.
- We need to have further discussions to make the dashboard page generic to all Analytics
- Create a new blank dashboard listing page specifically for
/analytics/dashboardsand point to this page (contents to be filled in by groupproduct analytics and groupoptimize initially).- Blank slate which will be defined by the discussions we need to have in UX.
- Means that we separate out the PA onboarding flow discussion from the dashboards listing immediately and PA work won't hold the generic listing page.
- Will require us to port over our work later.
Chosen solution
We will create a new blank shared dashboard listing page under /analytics/dashboards at the project-level. This will be styled in the same way as the existing Product Analytics listing.
Designs
No visual changes—we won't have the implementation details button.
Implementation plan
- Create a new HAML file in
ee/app/views/projects/analytics/dashboards.html.hamlto add the Vue anchor point#js-analytics-dashboards-list-appcopying the data fromee/app/views/projects/product_analytics/dashboards.haml. - Create a new Vue file structure at
ee/app/assets/javascripts/analytics/dashboards-listwhich copies the file structure and code fromee/app/assets/javascripts/product_analytics/dashboards. - Add controller to link the route to the view.
- Copy route to the analytics namespace
- Show product analytics specific dashboards if
cube_api_proxyandproduct_analytics_internal_previewfeature flag's are enabled, the settings exist, the project has the feature, and the user has permissions.project.licensed_feature_available?(:product_analytics) && can?(current_user, :read_product_analytics, project)- Onboarding will be handled by Present call-to-actions to configure dashboards... (#388629 - closed)
- Copy unit specs from
ee/spec/frontend/product_analytics/dashboardsand remove tests that are no longer needed by the revised code. - Copy feature spec from
ee/spec/features/projects/product_analytics/dashboards_spec.rband update to remove tests that are no longer needed by the revised code. - Remove
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb#L87product analytics specific feature checks and update path to point to the new/analytics/dashboardsURL.
Edited by Robert Hunt