Enhance branch selector field

What does this MR do and why?

Implements responsive sizing for branch/ref selectors to improve usability when working with long branch names. This addresses the issue where the ref selector field was too small and didn't utilize available screen space.

Changelog: changed

Changes include:

  • Adding fluid-width to both ref selectors (source and target branch)
  • Setting responsive maxWidth values according to viewport breakpoints:
    • Desktop (≥768px): gl-max-w-xs (20rem/320px)
    • Tablet (576px-767px): gl-max-w-4/10 (40%)
    • Mobile (<576px): gl-max-w-full (100%)
  • Implementing responsive layout behavior so breadcrumbs stack below the ref selector at narrow viewports

Closes #438154

How to test

  1. Navigate to a repository's commits page or file tree view
  2. Test on different viewport sizes:
    • Desktop (1920px+): Ref selector should be constrained to ~320px width
    • Tablet (768px-1024px): Ref selector should take 40% of available width
    • Mobile (<576px): Ref selector should take 100% of available width
  3. Verify breadcrumbs wrap below the ref selector on narrow viewports
  4. Test with long branch names (e.g., features/developer/version/feature-name) to confirm improved readability

Screenshots or screen recordings

Viewport Before After
Desktop (1920px) before-desktop) after-desktop)
Tablet (768px) before-tablet) after-tablet)
Mobile (375px) before-mobile) after-mobile)

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • Accessibility verified
  • No breaking changes ## Deployment notes No special deployment considerations. This is a UI improvement with no backend changes.

Review checklist

  • Code review
  • Design review (if applicable)
  • QA testing
Edited by Joseph Fletcher

Merge request reports

Loading