Skip to content

Migrate trial's namespace selector away from select2

What does this MR do and why?

This migrates the trial namespace selector away from select2 in favor of GlListbox.

Screenshots or screen recordings

Before After
Nothing selected Screen_Shot_2022-11-01_at_8.01.52_AM Screen_Shot_2022-11-01_at_8.00.44_AM
Create group selected Screen_Shot_2022-11-01_at_8.03.06_AM Screen_Shot_2022-11-01_at_8.00.58_AM
Existing group selected Screen_Shot_2022-11-01_at_8.03.24_AM Screen_Shot_2022-11-01_at_8.01.21_AM
Dropdown open Screen_Shot_2022-11-01_at_8.04.00_AM Screen_Shot_2022-11-03_at_8.11.28_AM

How to set up and validate locally

  1. Apply the following patch to ensure you can access the affected page.

    diff --git a/ee/app/controllers/trials_controller.rb b/ee/app/controllers/trials_controller.rb
    index 46770eb524a..51d5144f660 100644
    --- a/ee/app/controllers/trials_controller.rb
    +++ b/ee/app/controllers/trials_controller.rb
    @@ -10,12 +10,12 @@ class TrialsController < ApplicationController
     
       layout 'minimal'
     
    -  before_action :check_if_gl_com_or_dev
    -  before_action :authenticate_user!, except: [:create_hand_raise_lead]
    -  before_action :authenticate_user_404!, only: [:create_hand_raise_lead]
    -  before_action :find_or_create_namespace, only: :apply
    -  before_action :find_namespace, only: [:extend_reactivate, :create_hand_raise_lead]
    -  before_action :authenticate_namespace_owner!, only: [:extend_reactivate]
    +  # before_action :check_if_gl_com_or_dev
    +  # before_action :authenticate_user!, except: [:create_hand_raise_lead]
    +  # before_action :authenticate_user_404!, only: [:create_hand_raise_lead]
    +  # before_action :find_or_create_namespace, only: :apply
    +  # before_action :find_namespace, only: [:extend_reactivate, :create_hand_raise_lead]
    +  # before_action :authenticate_namespace_owner!, only: [:extend_reactivate]
       before_action only: [:new, :select] do
         push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops)
       end
  2. Navigate to http://gdk.test:3000/-/trials/select

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

Edited by Paul Gascou-Vaillancourt

Merge request reports