Skip to content

Fix clipped text and keyboard gaps in the Files pane's file list - #19882

Merged
gtritchie merged 26 commits into
mainfrom
bugfix/files-header-ellipsis
Dec 2, 2026
Merged

gtritchie merged 26 commits into
mainfrom
bugfix/files-header-ellipsis

Conversation

@gtritchie

@gtritchie gtritchie commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #19858.

Fixes text clipping, an unlabeled column, and keyboard gaps in the Files pane's file list.

Text that doesn't fit

  • Header labels and Size and Modified values too long for their column now end in an ellipsis instead of being cut off mid-character. The cell's text-overflow didn't reach the text, which sits in child boxes. The ellipsis is now set on those boxes:
    • the header's sort button
    • the text box beside the sort icon
    • ResizableHeader's text box
    • the div inside each Size and Modified cell
  • The checkbox column is left out because clipping its div would cut off the checkbox's focus ring.

Icon column

  • The header shows "Type", where it was blank with visually hidden "File type" text.
  • The column is 56px wide, up from 26px, so the label fits beside the sort icon.
  • Icons are centered in the column.

Screen readers and keyboard

  • The list's table is named "File Browser".
  • Each folder shown puts keyboard focus on its first row's name. Before, it started in the checkbox column, which is empty in the ".." row. Showing the same folder again, as a refresh does, keeps the focused cell.
  • Enter on a focused name does what a click does: it opens a folder, the parent folder, or a file. A held Enter's repeats and Enter with Ctrl, Cmd, Alt, or Shift are ignored.
    • Opening a folder swaps the list for a progress panel while it loads, which dropped focus to the page. The new listing takes focus back if the list had it and nothing else has taken it since.
  • HTML and data files open a menu of ways to open them, which was positioned at the triggering event's pointer and didn't take focus. Opened by Enter, it now shows below the focused name and takes focus, and returns focus to the name when it closes. A click still shows it at the pointer.

Tests

New e2e tests in files_column_headers.test.ts and files_list_keyboard.test.ts cover:

  • the "Type" label, sorted and unsorted
  • icon centering
  • ellipses on narrowed headers and values
  • the table's name
  • where Tab lands, in the first folder and after switching folders
  • Enter on a folder, "..", and a file
  • focus after a delayed listing
  • the HTML menu's position and focus
  • focus returning from a dialog opened from the menu

On macOS with npm run test:server-dev, tests/panes/files/ and tests/panes/console/console_header_buttons.test.ts had 76 passed and 5 skipped.

The icon column's header was blank, showing only a sort arrow when
sorted; its name, "File type", was visually hidden text. It now shows
"Type" (in French too, replacing "Type de fichier"), and the column is
56px wide, up from 26px, so the label fits beside the sort arrow.

Addresses #19858
The header <th> sets text-overflow: ellipsis, but its text sits in
boxes inside it: the sort button, the text box beside the sort icon
when sorted, and ResizableHeader's text box. text-overflow doesn't
reach text in a child block, so a narrow column cut its label off
mid-letter. Set the ellipsis on those boxes instead.

Addresses #19858
Widening the icon column to fit its "Type" header left the 16px icons
at its left edge, 6px in, with 34px of the 56px column empty to their
right. Center them instead.

Addresses #19858
VirtualizedDataGrid's padding rows also carry __gwt_row but hold no
icon, so a folder large enough to virtualize made the test throw.

Addresses #19858
The grid's cells clip overflow, but a text column's text sits in GWT's
div inside the cell, which the cell's text-overflow doesn't reach. So a
narrow Size or Modified column cut its values off mid-character. Set
the ellipsis on that div in those two columns. The checkbox column is
left out, since its div is the checkbox's height and clipping it would
cut off the focus ring.

Addresses #19858
The file list's table had no accessible name, so screen readers
announced it only as a table. Label it "File Browser" ("Explorateur de
fichiers" in French).

Addresses #19858
Tab into the file list focused the first row's checkbox cell, which is
empty in the ".." row. Each folder shown now puts the list's keyboard
focus on its first row's name instead. Showing the same folder again,
as a refresh does, keeps the cell the user had focused.

Addresses #19858
Enter on a focused name in the Files pane's file list did nothing, so a
keyboard user could reach a file or folder but not open it. Enter now
does what a click on the name does: it opens a folder, the ".." parent
folder, or a file.

Opening a folder shows a progress panel in place of the list while the
listing loads, which dropped focus to the page. The new listing now
takes focus back, on its first row's name, when the list had focus.

Addresses #19858
The test checked the icons in HOME, which can be empty in the test
sandbox. HOME also has no ".." row, so the test had no rows to check
and failed waiting for one.

Addresses #19858
Enter on an HTML file or a data file opens a menu of ways to open it,
which was placed at the pointer position of the triggering event. A key
press has none, so the menu showed at the window's top-left, and it
didn't take focus, so the keyboard couldn't use it. Opened by Enter,
the menu now shows below the focused name and takes focus, with its
first item highlighted, and gives focus back to the name when Escape
closes it. A click still shows it at the pointer.

A slow folder listing also no longer pulls focus back to the list when
the user has focused something else while it loaded.

Addresses #19858
Closing a keyboard-opened open-with menu gave focus back to the file
name through the list, which moves focus a tick later. A chosen item's
command can open a dialog before then: once Import Dataset has checked
its dependencies, it opens its dialog at once, and the dialog took the
page body as the place to return focus, so Escape left focus nowhere.
The menu now focuses the name itself as it closes.

Addresses #19858
The test pressed Escape while the dialog's preview was still loading,
then deleted the folder. The preview then reported the CSV missing in
an Error dialog, which kept focus from the Console in the next test,
files_list_target_size.

Addresses #19858
Enter on a focused name also ran for the keydowns a held key
auto-repeats. Each new listing focuses its first row, "..", so holding
Enter on a folder opened it and then went up one folder per repeat.
Enter with Ctrl, Cmd, Alt, or Shift also opened the name, rather than
being left to shortcuts. Only a plain first press opens it now.

Addresses #19858
Focusing the list set its keyboard-selected row, which made the grid
resolve that row by position. Refreshing a folder with focus in the
list could then land focus on whichever file had moved into that row.
FilesList.focus() now focuses the selected cell as rendered, and the
pane calls it once a new listing has rendered, so the grid keeps focus
on the same file.

Closing a keyboard-opened open-with menu now focuses the list's
selected cell too, rather than the cell that had focus when it opened,
which a redraw while the menu showed would have replaced.

Addresses #19858
readr is already in required-packages.txt, which global setup installs.

Addresses #19858
Closing a keyboard-opened open-with menu focused the list's selected
cell. The grid looks a row up only when its index is below the count
of rendered rows, which a long listing's virtualized rows past the
first few hundred aren't, so focus fell to the page. The menu now
focuses the name it was opened from while that name is still shown,
and the list's selected cell only when a redraw has replaced it.

Addresses #19858
The check that nothing else had taken focus ran when the listing
arrived, but the list takes focus a tick later, once the listing has
rendered. Focus moved in between would have been taken back. The check
now runs when the list takes focus.

Addresses #19858
The test waited for file-001.txt before sorting by name ascending. With
the list left sorted descending, that file is at the far end of the
listing, outside the rows the grid draws, so the wait timed out. It now
waits for the breadcrumb to show the new folder, sorts, and then checks
the file.

Addresses #19858
Both Files test files had their own copy. The shared one waits after
each click for aria-sort to change, which the column-header copy's wait
didn't when the header started out descending.

Addresses #19858.
Playwright sends a second keydown on a key it holds as a repeat, so the
test no longer needs a DevTools session. It now covers the reported
sequence: the first keydown opens a folder, and the repeat lands on
".." and must not go back up.

Addresses #19858.
Playwright keeps a key it holds marked as pressed until keyboard.up, so
a failed assertion between the two would send the page's next Enter as
a repeat.

Addresses #19858.
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
6007 0 285 4
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 4 0 16 0
✅ desktop-linux 1509 0 49 0
✅ desktop-macos 1485 0 74 0
✅ desktop-windows 1501 0 60 3
✅ server-linux 1460 0 54 1
✅ setup 48 0 32 0

View report online


All platforms - commit 0dc801c75a49486c5efe9e9b27956ecd77cb89ed - Run #2608

@gtritchie
gtritchie merged commit 46e1cae into main Dec 2, 2026
47 checks passed
@gtritchie
gtritchie deleted the bugfix/files-header-ellipsis branch December 2, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files list column headers clip narrow text without an ellipsis

1 participant