Repository navigation
Description
When the Console pane has no other tabs (Terminal and Background Jobs closed), a long working directory path in the Console title bar draws over the pane's Clear Console, Minimize, and Restore/Maximize buttons. The "View the current working directory" button after the path is pushed past the pane's right edge.
Steps to reproduce
- Close the Terminal and Background Jobs tabs, so Console is the only tab in its pane.
- In the Console,
setwd()to a long path, e.g. a directory nested 10 or more levels deep. - Narrow the Console pane until the path no longer fits.
Measured in Chromium on RStudio Server (current main), with a 553px-wide Console pane: the path text spans x=107–617, over Clear Console (480–500), Minimize (513–527), and Restore (531–545). The working directory button is at 621–641, outside the pane. At a medium width, before the path reaches the frame buttons, the working directory button and Clear Console overlap each other.
With other tabs open
When the Console pane has other tabs (e.g. Terminal), the path is in the Console toolbar below the tabs, and a long path pushes the toolbar's buttons out of view instead.
- Open a Terminal, so the Console pane has Console and Terminal tabs, and select the Console tab.
setwd()to a long path, as above.
Measured in Chromium on RStudio Server, with a 406px-wide Console pane (x=9-415): the toolbar is 1184px wide (9-1193), the path spans 109-1127, and the working directory button (1127-1147), Find in Console (1151-1165), and Clear Console (1169-1189) are all past the pane's right edge, where they're clipped.
The Terminal toolbar has the same problem: its title, which is usually the terminal's working directory, pushes its buttons out of view. Measured with a 512px-wide pane (x=9-521): the toolbar is 1204px wide (9-1213), the title spans 158-1176, and Clear terminal and Close current terminal session (1176-1213) are past the pane's right edge. It appears when the terminal's title changes to a long directory, e.g. on opening a Terminal (View > Move Focus to Terminal) while R's working directory is a long path.
Cause
No other tabs: WindowFrame keeps the title bar's right end clear of the frame buttons when it places the header. In console-only mode, this rule in themeStyles.css (line 1173) overrides that with right: 0px !important, so the header spans the full pane width:
.windowFrameObject.consoleOnlyWindowFrame div.consoleHeaderLayout {
left: 0px !important;
top: 0px !important;
right: 0px !important;
bottom: 0px !important;
}The path label also has no truncation (overflow: visible), so it draws past the header's edge.
With other tabs: Toolbar, used by both the Console and Terminal toolbars, lays out its widgets in tables, which grow to fit their contents, so the toolbar becomes wider than the pane and the pane clips its right end.
Activity
[-]Long working directory path draws over the Console pane's buttons when the Console has no other tabs[/-][+]Long working directory path hides or overlaps the Console pane's buttons[/+]Mention the full-path tooltip in the long path NEWS entry
Count only scrollback lines in the console scrollback limit test
Skip clicks on any header button in the pane focus handler
Test the Console pane's buttons with a long working directory
Keep the Workbench Jobs tab out of the console-only header test
Drop the Workbench Jobs pref from the console-only header test
Fix missing Find button and long-path overflow in the Console pane (#…