Skip to content

Product analytics settings use combined_analytics_dashboards instead

What does this MR do and why?

This MR updates:

  • Group settings to only show the Analytics Dashboards subsection when the :combined_analytics_dashboards feature flag is enabled.
  • Project settings to only show the Analytics section when the :combined_analytics_dashboards feature flag is enabled.
    • Once we show more than one subsection under Analytics this check could be moved to the Analytics Dashboards subsection as with groups.
  • Creates a new groups helper to check that the subsection can be shown.
  • Updates the helpers names to distinguish between the groups and projects helpers.

Flag off

Group settings

Before After
image image

Project settings

Before After
image image

Flag on

No visual changes

Group settings

Before After
image image

Project settings

Before After
image image

How to set up and validate locally

  1. Follow these instructions to set up Product Analytics in your GDK.
  2. With the feature flag disabled:
    1. Go to the group settings: [GDK_HOST]/groups/[GROUP_NAME]/-/edit.
    2. Expand Analytics and confirm that the Analytics Dashboards subsection is not shown.
    3. Go to the project settings: [GDK_HOST]/[GROUP_NAME]/[PROJECT_NAME]/edit.
    4. Confirm that the Analytics section is not shown.
  3. Enable the feature flag: echo "Feature.enable(:combined_analytics_dashboards)" | rails c
  4. With the feature flag enabled:
    1. Go to the group settings: [GDK_HOST]/groups/[GROUP_NAME]/-/edit.
    2. Expand Analytics and confirm that the Analytics Dashboards subsection is shown.
    3. Go to the project settings: [GDK_HOST]/[GROUP_NAME]/[PROJECT_NAME]/edit.
    4. Confirm that the Analytics section is shown.

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 #415065 (closed)

Edited by Robert Hunt

Merge request reports