Skip to content

Fe top n labels endpoint

Ezekiel Kigbo requested to merge fe-top-n-labels-endpoint into master

What does this MR do?

Fixes #196584 (closed)

  • Adds an additional api request for 'top n ranked labels' for a group
  • Moves the 'tasksByType.labelIds' state -> tasksByType.selectedLabelIds
  • Moves the task_by_type_filter specs to a separate file
  • Replaces jquery dropdown with GlNewDropDown
  • Updated specs

Requires:

Details

  • On load, at most the top N (10) labels should be preselected, the labels will be retrieved from the endpoint in #196582 (closed)
  • There should be a max 15 labels that can be selected
  • A warning should be displayed if a 16th label is clicked, Possible warning message: "Only 15 labels can be displayed at a time"

UI Changes

  • Indicate the max # of labels that can be selected
  • 10 labels selected by default
  • Less than 10 labels: hide UI n/n labels selected
  • 10 - 15 labels: display UI n/n labels selected
  • 15 selected - disable selecting new labels

Screenshots

Closed With labels selected
Screen_Shot_2020-03-04_at_7.46.01_pm Screen_Shot_2020-03-05_at_5.20.08_pm
With more than 10 labels selected Trying to select a label with max selected
Screen_Shot_2020-03-04_at_7.46.48_pm Screen_Shot_2020-03-05_at_5.22.00_pm
Updated screen recording from @ekigbo
Screen_Recording_2020-03-06_at_8.33.16_am

Testing

This MR requires 1 feature flag and 2 license flags to be enabled:

Steps

  1. Enable the required feature flags, and ensure you have the appropriate license
  2. Navigate to cycle analytics in the analytics space, ie http://localhost:3001/-/analytics/value_stream_analytics
  3. Select the gitlab org group from the dropdown
  4. The chart should will render at the bottom of the page
  5. You might need to adjust the dates to see any results
  6. Use the filters

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
Edited by 🤖 GitLab Bot 🤖

Merge request reports