Skip to content

Refactor issues_analytics component

Rudy Crespo requested to merge 233905-refactor-issues-analytics into master

What does this MR do and why?

As the second of three MRs to solve #233905 (closed), this MR does the following:

  1. Moves the current – and soon to be deprecated once issues_completed_analytics_feature_flag is rolled out – Issues Analytics chart and the majority of its Vuex properties/actions into its own component.
  2. Refactors issues_analytics.vue so that it functions as a base app. This will facilitate toggling between the old and new chart (coming in next MR) depending on if the user is a GitLab Ultimate customer and the issues_completed_analytics_feature_flag FF is enabled.
  3. Consolidates empty states in a new IssuesAnalyticsEmptyState component. Also moves "No data when filters applied" empty state to the correct place within the view (filters aren't currently being applied to the table – will be resolved in #422451 (closed)).

No changelog since this is a refactor.

Task Status
Add issues_completed_analytics GitLab Ultimate feature and issues_completed_analytics_feature_flag feature flag ( !128399 (merged))
Refactor issues_analytics.vue
Create new chart with "Issues closed"

Screenshots or screen recordings

State Before After
Default Screenshot 2023-08-18 at 12.29.18 PM.png Screenshot 2023-08-18 at 12.24.32 PM.png
Loading Screenshot 2023-08-18 at 12.30.50 PM.png Screenshot 2023-08-18 at 12.25.07 PM.png
No data empty state Screenshot 2023-08-18 at 12.32.33 PM.png Screenshot 2023-08-18 at 12.26.32 PM.png
No data with filters applied empty state Screenshot 2023-08-18 at 12.31.53 PM.png Screenshot 2023-08-18 at 12.26.22 PM.png

How to set up and validate locally

  1. Go to a group/project with issues, and visit http://{LOCAL_INSTANCE}/groups/{GROUP_PATH}/-/issues_analytics or http://{LOCAL_INSTANCE}/{GROUP_PATH}/{PROJECT_PATH}/-/analytics/issues_analytics and verify that there are no regressions.

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

Edited by Rudy Crespo

Merge request reports