Skip to content

Productivity Analytics: Allow user to clear chart data

What does this MR do?

This MR adds a button next to the main chart on the Productivity Analytics page which enables users to clear the current selection.

In particular the following is added:

  • Clear chart selection button in the app component which is only displayed when at least one item is selected on the main chart.
  • resetMainChartSelection action which commits UPDATE_SELECTED_CHART_ITEMS with item=null. Parts of the code were also refactored to re-use this action
  • mainChartHasSelection getter which is used in the app component to determine whether to display the newly added button.

This is behind the productivity_analytics feature flag.

Screenshots

Without selection With selection
main_chart_without_selection main_chart_with_selection

productivity_analytics_clear_chart_data

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #36019 (closed)

Edited by Martin Wortschack

Merge request reports

Loading