FE: Display selected users/groups
Why are we doing this work
- Users want to be able to select an individual user or group from a dropdown and view which ones are selected. Currently the display continues appending names forever, which doesn't look good.
The design suggests truncating the text.
It was proposed to show something like X users selected when more than one user is selected? It would be similar to this GitLab UI story: https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-new-dropdowns-listbox--custom-list-item.
Relevant links
Implementation plan
-
MR 1 -
frontend update user_select/group_selectto take advantage of truncation (see !104022 (comment 1181744605))
-
Verification steps
- Upload a GitLab Ultimate license
- Enable the
:scan_result_role_actionfeature flag with the below command
echo "Feature.enable(:scan_result_role_action)" | rails c
- Navigate to a project/group => Security & Compliance => Policies => New policy => Scan Result Policy
- Verify a user can select either
Individual UsersorGroupsin theActionsarea and the dropdown for selecting the users or groups displays the correct information
Edited by Alexander Turinske

