Skip to content

Migrate groups_select to GlListbox

Paul Gascou-Vaillancourt requested to merge 374010-groups-select into master

What does this MR do and why?

This migrates group selectors from select2 to GlListbox.

Notes:

  • As far as I could tell, the skipGroups, allAvailable and minAccessLevel params are never passed to the existing group selectors. I have therefore opted not to backport them to keep this MR small. I can see how they could be useful, but I suggest that we keep only the features we actually need for now, and we can iterate to re-add those in the future if needed.
  • The select2 selector supports infinite scrolling, but GlListbox does not. Some work is being done in gitlab-ui#1956 (closed) and gitlab-ui!3098 (merged) to enable this capability. In the meantime, if this is deemed absolutely necessary, we can keep the feature flag disabled by default.

Screenshots or screen recordings

Page Before After
Admin Area > Settings > Templates > Custom project templates Screen_Shot_2022-10-06_at_7.54.22_AM Screen_Shot_2022-10-06_at_7.53.28_AM
:group > Settings > General > Custom project templates Screen_Shot_2022-10-06_at_7.57.58_AM Screen_Shot_2022-10-06_at_7.58.35_AM

How to set up and validate locally

  1. Run yarn to install the required packages.
  2. Enable the vue_group_select feature flag.
echo "Feature.enable(:vue_group_select)" | rails c
  1. Navigate to the affected pages (see table above).

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

Edited by Paul Gascou-Vaillancourt

Merge request reports