Skip to content

Use GlCollapsibleListbox in ci_environments_dropdown.vue

Eugie Limpin requested to merge el-use-collapsible-listbox into master

Resolves #384285 (closed)

What does this MR do and why?

This MR changes the Vue component used to select environment scope of CI environment variables from GlDropdown to GlCollapsibleListbox.

Screenshots or screen recordings

before after
Closed b4_closed closed
Open b4_open open
With selection b4_with_selection with_selection
With search query b4_with_search with_search

Difference in looks

The dropdown is not occupying the whole width like before. This is because GlCollapsibleList doesn't (yet?) support specifying additional classes for the toggle button text (it only supports toggleClass which goes to the button.gl-button-dropdown-toggle).

Why? Screen_Shot_2022-12-07_at_9.56.03_PM

Difference in behavior

The dropdown does not clear the search term when it is closed nor when a new environment is created. This is because GlCollapsibleList does not support programmatically clearing the search input.

before after
Screen_Recording_2022-12-26_at_4.58.01_PM Screen_Recording_2022-12-26_at_5.15.04_PM

How to set up and validate locally

  1. Go to the CI settings page of a project. For example: http://localhost:3000/flightjs/Flight/-/settings/ci_cd
  2. Expand Variables section then click on Add variable
  3. Validate that you can:
    1. Select an existing environment
    2. Search through existing environments
    3. Create a new environment with a search term that doesn't correspond to any existing environment

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports