VSA: Ensure selected projects are always visible
What does this MR do and why?
Updates the projects dropdown filter to ensure we always display selected projects
When a search term has been added, the dropdown will only contain the first 50
items that match the term, if the selected project does not match the term it was previously not displayed, despite still being selected. This would lead to confusion since a project is selected, but it is not visible in the dropdown.
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2021-10-12_at_10.12.49_pm | Screen_Recording_2021-10-12_at_10.00.59_pm |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure you have an EE license, or stub the
cycle_analytics_for_groups
license feature to true - Create a group with multiple projects (for example 3)
- Set https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/analytics/shared/constants.js#L5 = to
1
- Navigate to value stream analytics for the group, ie for a project named clean-vsa-project in group new-vsa-group it would be http://
<gdk>
/group/:group_id/-/analytics/value_stream_analytics (or find it in the left menu) - Open the project dropdown, note the project that is visible
- Search for another project, select one of the projects that's returned from the async query
- Clear the search
- The selected project should still be visible
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #336385 (closed)
Edited by Ezekiel Kigbo