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 |
---|---|
How to set up and validate locally
- Open any merge request that has at least 2 commits
- Go to the Changes tab
- Try switching between MR versions using Versions dropdown