Skip to content

Fix long dropdown on branch selection

Michael Le requested to merge fix-wide-branch-dropdown into master

What does this MR do and why?

Add max-width class to toggle button and wrapping to dropdown breadcrumb to improve the display when viewing files in GitLab.

Closes #391782 (closed)

Out of scope

  • Dropdowns in "Repository > Compare" are not using RefSelector
  • Dropdowns in "Settings > Merge request approvals", "Settings > Repository > Protected branches" are not using RefSelector

Screenshots or screen recordings

Repository > Files (/-/tree/)

Max-width applied to dropdown (-/branches)

Before After
CleanShot_2023-02-03_at_15.03.47 CleanShot_2023-02-03_at_16.53.18

Long directories now wrap

Before After
CleanShot_2023-02-03_at_15.03.35 CleanShot_2023-02-03_at_16.56.45

Repository > Commits (-/commits/main)

Before After
CleanShot_2023-02-03_at_20.37.02 CleanShot_2023-02-03_at_19.58.10

Repository > Tags > New Tag

Before After
CleanShot_2023-02-03_at_20.38.17 CleanShot_2023-02-03_at_19.58.52

Repository > Contributors

Should look the same as the original fix for the dropdown here was done with Change contributors page to use Vue RefSwitcher (!109043 - merged) and we want to ensure there is no visual regression here.

Before After
CleanShot_2023-02-03_at_20.38.44 CleanShot_2023-02-03_at_20.43.43

Repository > Graph

Before After
CleanShot_2023-02-03_at_20.39.02 CleanShot_2023-02-03_at_20.10.44

Repository > Files > Find File

Before After
CleanShot_2023-02-03_at_20.39.24 CleanShot_2023-02-03_at_20.10.28

Code search from top nav

Before After
CleanShot_2023-02-03_at_20.39.40 CleanShot_2023-02-03_at_20.04.26

Pipelines > Schedules > New schedule

Before After
CleanShot_2023-02-03_at_20.40.08 CleanShot_2023-02-03_at_20.07.30

Security & Compliance > On demand scans > New scan

/-/on_demand_scans/new

Before After
CleanShot_2023-02-03_at_20.40.29 CleanShot_2023-02-03_at_20.08.38

Settings > Repository > Branch defaults

/-/settings/repository

Before After
CleanShot_2023-02-03_at_20.40.52 CleanShot_2023-02-03_at_20.09.11

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 Michael Le

Merge request reports