File tree browser: Improve UX with stable header layout and keyboard dismissal

Overview

Follow-up improvements for the file tree browser (FTB) to enhance user experience and accessibility.

Related to: !217853 (merged)

Issues to Address

1. Header Layout Shift When Toggling FTB

Problem: The header area layout shifts/changes when toggling the file tree browser on/off. This is distracting from a UX perspective.

Layout shift mobile Layout shift desktop

Root Cause: The toggle button conditionally appears/disappears in the header when the FTB is toggled, causing the header to reflow.

Solution: Keep the toggle button visible in the header at all times (or reserve space for it) to prevent layout shifts.

Acceptance Criteria:

  • Header layout remains stable when toggling FTB on/off
  • No visual jank or reflow when opening/closing the panel
  • Toggle button is always accessible

2. Add Esc Key Support to Dismiss Overlay

Problem: Users cannot dismiss the file tree browser panel using the Esc key when in peek mode (floating panel on mobile/tablet).

Solution: Add keyboard event listener to close the overlay when Esc is pressed.

Acceptance Criteria:

  • Pressing Esc closes the file tree browser panel when in peek mode
  • Keyboard users can dismiss the panel without clicking the toggle button
  • Esc key doesn't interfere with other keyboard shortcuts
  • Test coverage for the new functionality

Related Issues

  • Original issue: #583851 (closed)
  • MR: !217853 (merged)

Notes

  • These are non-blocking improvements that can be addressed in a follow-up
  • The Esc key dismissal is particularly important for keyboard accessibility
  • The header layout shift is a minor UX polish but improves the overall feel
Edited Jan 09, 2026 by Joseph Fletcher
Assignee Loading
Time tracking Loading