Repository navigation
Description
The Files pane's file list column headers clip text that doesn't fit, with no ellipsis. For example, when the Modified column is about 30px wide, its header shows "Mod" cut off, with no ellipsis.
The header th has overflow: hidden; text-overflow: ellipsis; white-space: nowrap, but the text sits inside the header's sort button (the role="button" div in the th), which has overflow: visible. text-overflow applies only to the block whose own content overflows, so it doesn't reach text inside that child block, and the th simply clips it.
Steps to reproduce
- Open the Files pane.
- Drag the Modified (or Size) column's resize handle to make the column narrow, about 30px.
- The header text is cut off with no ellipsis.
Possible fix
Add overflow: hidden; text-overflow: ellipsis to the sort button, and to the text box beside the sort icon when the column is sorted, as EnvironmentObjectGrid.css does for the Environment pane's grid. Then re-check the Size and Modified column resize handles in the sorted state, since the button would clip anything that extends past it.
Found while reviewing #19822, which made these header buttons fill their cells; the clipping predates that change.
Related problems fixed alongside
#19882 also fixes these problems in the same file list:
- Size and Modified values were cut off the same way as the headers when their column was too narrow. They now end in an ellipsis too.
- The file icon column's header was blank. It showed only the sort arrow when sorted, and its name, "File type", was visually hidden text. It now shows "Type", the column is wider so the label fits beside the sort arrow, and the icons are centered in it.
- The list had no accessible name. Screen readers announced it only as a table. It's now named "File Browser".
- Tab into the list focused the first row's checkbox cell, which is empty in the ".." row. Tab now lands on the first row's name in each folder shown.
- Enter on a focused name did nothing, so a keyboard user could reach a file or folder but not open it. Enter now does what a click does. When it opens a folder, focus stays in the list.
- The menu for HTML and data files couldn't be used from the keyboard. These files open a menu of ways to open them, such as "Open in Editor". Opened by Enter, it appeared at the window's top-left and didn't take focus. It now shows below the focused name with focus, and Escape returns focus to the name.
Activity
Ignore held and modified Enter on Files list names
Keep Files list focus on the same file across a re-list
Drop the redundant readr install from the Files keyboard test
Return menu focus to the file name in long Files listings
Check for claimed focus when the Files list refocuses
Wait on the breadcrumb in the long-folder Files keyboard test
Share the Files pane sort-by-name test helper
Hold Enter with Playwright in the Files keyboard test
Release held Enter if the Files keyboard test fails mid-hold
Fix clipped text and keyboard gaps in the Files pane's file list (#19882