Repository navigation
Make active document and pane tabs easier to identify - #18734
Conversation
RStudio E2E - all platforms1 test(s) failed
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
gtritchie
left a comment
There was a problem hiding this comment.
No blocking issues. 2 follow-up, 4 nits (2 commented inline, 2 counted below)
🟠 is real but not merge-blocking — either address it here or open an issue to do so later. 🟡 is optional.
- 🟠
src/gwt/.../prefs/model/UserPrefs.java:97— satellite windows never get the highlight body class at startup - 🟠
themeStyles.css:1450— minimized pane tab strip de-bolds and gains no indicator - 🟡
NEWS.md:5— entry doesn't use the linked-issue prefix format - 🟡
themeStyles.css:2512— dark override wins on source order rather than specificity
Nits not commented inline
themeStyles.css:2509—#3465a4is a new accent blue that appears nowhere else in this stylesheet; the accent used elsewhere is#75AADB(line 3275). A later accent change will miss this one.themeStyles.css:2517— making label weight depend on selection changes each tab's rendered width, so the strip shifts horizontally on every switch, and filenames near the 200px.docTabLabelmax-width gain an ellipsis only while selected.
Checked and clear
All six generate-prefs.R outputs are present and consistent (UserPrefValues.hpp/.cpp, SessionUserPrefValues.R, UserPrefsAccessor.java, UserPrefsAccessorConstants.java, _en.properties). The font-weight: 600 rule out-specifies both .docTabPanel.moduleTabPanel (line 1344) and the dark 400 rule (line 1454), so bold still wins for the selected tab in every theme; the dark 400 rule and the new normal rule tie on specificity but resolve to the same weight. Doc and pane tab labels are both single real .gwt-Label elements inside table.rstheme_tabLayoutCenter — the dirty marker uses setStyleName, which drops gwt-Label, so the test's .gwt-Label locators can't hit strict-mode violations. The per-theme -selected rules at 2978/3033/3108 set only background, so there's no box-shadow conflict; dialog tab panels don't use rstheme_tabLayoutCenter and are unaffected; and the rgb(...) escaping in the test's accent regex is correct.
| eventBus.addHandler(DeferredInitCompletedEvent.TYPE, this); | ||
|
|
||
| // Satellites receive the same preference updates as the main window. | ||
| highlightActiveTabs().addValueChangeHandler(event -> syncHighlightActiveTabs()); |
There was a problem hiding this comment.
🟠 Satellite windows never get rstudio-highlight-active-tabs at startup, so a popped-out source window shows no highlight until the preference is toggled.
| highlightActiveTabs().addValueChangeHandler(event -> syncHighlightActiveTabs()); | |
| highlightActiveTabs().bind(enabled -> syncHighlightActiveTabs()); |
Why
syncHighlightActiveTabs() is otherwise reached only from onSessionInit, and that handler doesn't run in satellites.
Satellite.setSessionInfo() (Satellite.java:245-259) fires SessionInitEvent and only afterwards calls pUIPrefs_.get() — that line exists precisely because prefs aren't constructed yet. Nothing else on the satellite startup path builds them first: SatelliteApplication holds pUserPrefs_ as a @SuppressWarnings("unused") Provider it never calls, AddinsCommandManager (the one thing constructed before the fire) doesn't inject prefs, and pAceThemes_.get() runs after satellite_.initialize(...).
So UserPrefs is first constructed by SatelliteWindow's own SessionInitEvent handler, mid-dispatch. EventBus extends HandlerManager, which defers handler additions made while firing, so the UserPrefs.onSessionInit handler registered at that moment never sees the in-flight event.
Source satellites do render the tab strip (SourceSatelliteWindow.onInitialize calls pSource_.get().loadDisplay() → SourcePane → DocTabLayoutPanel), so the effect is visible: pop a document out and its tabs are unstyled. bind() adds the same value-change handler and also applies the current value immediately — at satellite construction time session info is already set, so it reads correctly there, and onSessionInit still covers the main window, where construction predates client_init.
Not merge-blocking: it's cosmetic, and toggling the preference repairs the window.
| padding-top: 4px; | ||
| } | ||
|
|
||
| .rstudio-highlight-active-tabs .moduleTabPanel .gwt-TabLayoutPanelTab .gwt-Label { |
There was a problem hiding this comment.
🟠 This also de-bolds minimized pane tab strips, which get neither the bold label nor the overline, so they just lose the bold they had.
Either mark the selected tab in MinimizedModuleTabLayoutPanel.setTabs() too, or exclude .minimized from this rule.
Why
MinimizedModuleTabLayoutPanel.setTabs() (MinimizedModuleTabLayoutPanel.java:59) adds only gwt-TabLayoutPanelTab to each ModuleTab — never gwt-TabLayoutPanelTab-selected — and the strip is a plain HorizontalPanel added as the frame's extra widget, so it sits outside any .gwt-TabLayoutPanelTabs container.
Both new rules therefore miss it: the font-weight: 600 and light box-shadow rules need the .gwt-TabLayoutPanelTabs ancestor, and all three need -selected. This rule does apply, and the panel carries moduleTabPanel. With the preference on (the default), minimizing the Files/Plots/Packages/Help pane renders every label in the strip at regular weight where it was previously bold, with nothing marking the selected pane.
Not merge-blocking: purely visual, and that strip had no selection indicator before this change either.
|
|
||
| ### New | ||
| - Optimized RStudio Desktop startup time. | ||
| - Active document and pane tabs now have a bold label and a blue overline to make them easier to identify. This is enabled by default and can be disabled in Global Options > General > Basic > Other. (#18692) |
There was a problem hiding this comment.
🟡 The trailing bare (#18692) renders as plain text, so the entry has no link to the issue.
| - Active document and pane tabs now have a bold label and a blue overline to make them easier to identify. This is enabled by default and can be disabled in Global Options > General > Basic > Other. (#18692) | |
| - ([#18692](https://github.com/rstudio/rstudio/issues/18692)): Active document and pane tabs now have a bold label and a blue overline to make them easier to identify. This is enabled by default and can be disabled in Global Options > General > Basic > Other. |
Why
Every other entry in NEWS.md leads with a linked issue reference in the - ([#NNNN](url)): form — see lines 7-10 in the ### Fixed section.
| box-shadow: 0 2px 0 #3465a4 inset; | ||
| } | ||
|
|
||
| .rstudio-highlight-active-tabs .rstudio-themes-dark .gwt-TabLayoutPanelTab-selected table.rstheme_tabLayoutCenter { |
There was a problem hiding this comment.
🟡 This override ties the light rule on specificity, so it wins only because it appears four lines later.
| .rstudio-highlight-active-tabs .rstudio-themes-dark .gwt-TabLayoutPanelTab-selected table.rstheme_tabLayoutCenter { | |
| .rstudio-highlight-active-tabs .rstudio-themes-dark .gwt-TabLayoutPanelTabs .gwt-TabLayoutPanelTab-selected table.rstheme_tabLayoutCenter { |
Why
Both selectors weigh in at four classes plus one element. Reordering this block later, or a user rstheme that re-declares the light selector after these rules, would silently restore the dark navy #3465a4 overline on dark tab backgrounds. Inserting .gwt-TabLayoutPanelTabs after .rstudio-themes-dark (the theme class lands on #rstudio_container, an ancestor of the tab strip) makes the override win on specificity and match exactly the element set it is overriding.
) * highlight only the active document tab, including its top border Follow-up to #18734. Pane tabs keep their previous styling; the selected document tab's overline now recolors the tab's own top border and extends it one pixel inward, so it reads as a single 2px bar that follows the rounded corners. Addresses #18692 * draw the active tab indicator as a flat bar over the pane frame border The pane frame paints a 1px border across the top row of the tab strip, which covered the tab's recolored top border. Draw the indicator as a raised 2px ::before overlay on the selected document tab instead, and keep a 1px inset shadow so the bar flows into the tab's rounded corners. * draw the active tab indicator's end curves by hand An inset box-shadow is painted inside the border box while the flat bar fills it, so the two could never meet at the tab's rounded corners. Shape the overlay like the top of the tab instead: same 3px radius, 2px top border, 1px side borders, all in the accent color. * extend the active tab indicator 1px upward The overlay now starts 1px above the tab with a 3px top edge; its radius grows by 1px so the outer curves stay concentric with the tab's corners. * anchor the active tab indicator so it escapes the tab strip clipping The tab strip sits 1px above its GWT layout layer, which clips it, so the tab's top row (where the pane frame's border paints) was never visible and the in-flow overlay could not extend upward. Position the overlay with CSS anchor positioning as a fixed box glued to the tab instead; the in-flow version remains as the fallback where anchors are unsupported. * use a more saturated accent for the dark theme tab indicator #8ab4f8 is nearly as light as the tab label and read as a highlight rather than an accent; #4f8fea matches the light theme's saturation. * darken the dark theme tab indicator slightly * scope anchored tab indicator rules to docTabPanel * drop unused accent argument from disabled-state highlight checks * clip the tab indicator while the selected tab is partly scrolled out of view * fix active tab preference test after reload
Intent
Make the active document or pane tab easier to identify when its background is only subtly different from neighboring tabs. Highlighting is enabled by default; users can turn it off with Highlight active document and pane tabs in Global Options > General > Basic > Other. Closes #18692.
The preview illustrates the highlighting. The current implementation uses a 2px overline and preserves tab widths when the selection changes.
Approach
Selected tabs have a 2px blue inset overline and a heavier label. A subtle 0.4px text stroke adds emphasis without changing font metrics, so switching tabs preserves tab widths and filename truncation. Dark themes use a lighter blue overline with an explicitly more specific selector. Minimized pane strips keep their previous label styling because they have no selected-tab indicator. The rules add no height or padding and use the existing theme hooks without
!important.The new
highlight_active_tabsuser preference defaults totrueand controls the highlighting through a body CSS class. Applying a change updates the tabs immediately, and the choice persists across reloads. Disabling it restores the previous tab styling. The preference handler runs in the main window and satellites.Automated Tests
git diff --checkpassed.Desktop tests used this worktree's rebuilt frontend and updated preference schema with the existing local C++ session binary. A full native rebuild was not performed.
QA Notes
Visually checked the selected labels and overlines in Modern light, Modern dark, and Sky. Checked the checkbox's placement under General > Basic > Other.
To verify, open several documents, including a long filename, and switch both document and pane tabs. The selected label should look heavier without moving neighboring tabs or changing filename truncation. Minimize a pane and confirm its labels retain their previous styling. Uncheck the preference and click Apply: the overlines and added text emphasis should disappear. Reload RStudio and confirm the setting remains off, then re-enable it.
Documentation
Updated
NEWS.mdwith a linked issue reference, a description of the visual change, and where to disable it.