Skip to content

Draft: Migrate compare versions dropdown to GlCollapsibleListbox

What does this MR do and why?

Resolves Migrate "app/assets/javascripts/diffs/component... (#413047).

This migration uses listbox component to replace the legacy dropdown. It was decided because it has a selected state, while the disclosure dropdown does not. However listbox doesn't have a support for href, so I've added the manual handling of the links there. When you select a version the page URL will be manually switched causing a new page load. This mimicks how links work but unfortunately you won't be able to use the items exactly like links, they'll just be buttons.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Open any merge request that has at least 2 commits
  2. Go to the Changes tab
  3. Try switching between MR versions using Versions dropdown

Merge request reports