Skip to content

Fix MR analytics label search for large groups

Alex Pennells requested to merge 415820-max-label-suggestions into master

What does this MR do and why?

For large groups (such as gitlab-org) the label search on MR analytics has issues when rendering due to the number of labels rendered at once. Apply the maxSuggestions option on the FilteredSearchBar label search to reduce the number of components rendered. Search is already implemented, so they will still have access to the labels not rendered initially.

Screenshots or screen recordings

With a maxSuggestions: 2 applied, the changes actually suggest a max of 100 labels

Screenshot_2023-08-09_at_10.43.19_PM

How to set up and validate locally

  1. Visit the MR analytics page for a project: http://gdk.test:3000/flightjs/Flight/-/analytics/merge_request_analytics
  2. In the filter bar, select Label and view the list of available labels
  3. Reduce MAX_LABEL_SUGGESTIONS constant or seed new labels for the project
  4. Validate that the number of labels rendered matches MAX_LABEL_SUGGESTIONS

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

Merge request reports

Loading