[go: up one dir, main page]

Skip to content

Convert legacy Select2 dropdown to use gl_dropdown Rails helper

What does this MR do and why?

An attempt at improving the UI, related to #332013 (closed)


This MR updates the target branch selector when editing an MR to use the (slightly) more modernized gl_dropdown Rails helper rather than the older "select2" implicitly rendered dropdown.

This isn't intended to be a full conversion to the newest, most modern solution available (create a Vue app, render gitlab-ui components). The main reasons for that are:

  1. Out of scope
  2. There's no existing "dropdown with remote data + filter input" component, which means it would need to be created by hand, further expanding the scope

So while this isn't the best possible solution, it is an iterative step in modernizing this part of the UI.

Screenshots or screen recordings

Before After
change-target-branch-editing-mr-on-master change-target-branch-editing-mr

How to set up and validate locally

  1. Make sure you have at least two branches in your test project
    • At least 3 is best
  2. Create an MR
  3. Edit the MR
  4. Select a different branch as the target
  5. Save the change
    • If you only have two branches, you'll note that there's an error here: you necessarily had to change the branch to be the same as the source branch.
    • If you encounter this error, just create a third branch and then repeat steps 3-5.

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 Thomas Randolph

Merge request reports

Loading