Repository navigation
Place the editor onboarding area in the folder's client area - #4556
Open
HeikoKlare wants to merge 1 commit into
Open
HeikoKlare wants to merge 1 commit into
HeikoKlare wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Onboarding bounds can remain stale after tab-height, padding, or renderer changes without a folder resize, allowing content to overlap taller tabs.
1 open issue
What changed in this PR
This PR changes empty-editor onboarding layout to use the tab folder’s client area instead of fixed offsets, aiming to keep tabs and renderer borders unobstructed.
Changes:
- Positions and sizes onboarding from
CTabFolder.getClientArea(). - Removes the unused onboarding spacing constants.
- Updates geometry and visibility assertions and adds a tab-height change regression test.
| File | Description |
|---|---|
| tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRendererTest.java | Checks client-area alignment, tab-height changes, and hiding onboarding when an editor opens. |
| bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java | Replaces fixed onboarding offsets with client-area bounds. |
Review effort: Balanced
HeikoKlare
force-pushed
the
onboarding-uses-client-area
branch
2 times, most recently
from
November 30, 2026 17:52
8a6f887 to
72b47ff
Compare
HeikoKlare
force-pushed
the
onboarding-uses-client-area
branch
from
December 1, 2026 07:30
72b47ff to
a9fb6de
Compare
With no editor open, an editor stack shows the perspective's onboarding information in an area that covers the empty folder. That area was placed with fixed offsets that assume one tab height and a thin border, so it covered the frame of tab renderers with a different trim, such as the rounded lower corners of a renderer that draws rounded frames, and it was misplaced for other tab heights. The onboarding area now fills exactly the space the folder leaves for its content, so the folder's tabs and frame stay visible for any tab height and renderer. The container is laid out in the folder's client area, which includes the renderer's trim. It is updated on resize, and also on paint, because CTabFolder does not send a resize event for every change of its client area: with CTabRendering, a new renderer already shows in the client area before the folder's deferred update compares it, and a padding change does not go through that update at all. Both repaint the folder. A new tab height with CTabRendering does not repaint an empty folder on every platform; that case needs CTabFolder to send the resize event. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed, as nothing uses them anymore and the package is exported to friends only. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
HeikoKlare
force-pushed
the
onboarding-uses-client-area
branch
from
December 3, 2026 10:59
a9fb6de to
b13656d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
With no editor open, an editor stack shows the perspective's onboarding information (image and key bindings) in an area that covers the empty editor folder. That area is placed with fixed offsets that assume one particular tab height and a thin border. With a different tab height, for example set through the
swt-tab-heightCSS property, the area is misplaced and overlaps the tab row. With a tab renderer that draws a different frame, such as one with rounded lower corners, the area paints over that frame, so the empty editor area looks broken.Solution
The onboarding area now fills exactly the space the folder leaves for its content. The folder's tabs and frame stay visible for any tab height and any tab renderer, and the area follows changes to the tab height, the renderer or its padding at runtime.
Technical concept
The container is laid out in the folder's client area, which already accounts for the tab row and the renderer's trim. It is updated on resize, and also on paint, because
CTabFolderdoes not send a resize event for every change of its client area. WithCTabRendering, a new renderer already shows in the client area before the folder's deferred update compares the old and new areas, and a padding change does not go through that update at all. Both repaint the folder; the paint listener only compares bounds and adjusts them asynchronously, outside of the paint event.A new tab height with
CTabRenderinghas the same problem, butsetTabHeightdoes not repaint an empty folder, at least on Windows, so the paint check cannot catch it. eclipse-platform/eclipse.platform.swt#3906 makesCTabFoldersend the resize event for tab height and renderer changes, which covers that case and is tested there.The
ONBOARDING_TOP_SPACINGandONBOARDING_SPACINGconstants are removed: nothing uses them anymore, and the package is exported to friends only, so they are not API.Testing
StackRendererTestchecks that the onboarding area matches the folder's client area, also after opening an editor. New tests change the tab height (default renderer), theCTabRenderingpadding and the renderer itself without resizing the folder, and check that the area follows the client area. TheCTabRenderingtests fail without the paint check.Manually: close all editors so the onboarding area shows, then apply
.MPartStack { swt-tab-height: 60px; }in the CSS Scratchpad. The area now starts right below the taller tab row, whereas before it stayed at a fixed 30 px offset and overlapped the tab row. With a tab renderer that draws a thicker or rounded frame, the frame stays visible instead of being painted over.🤖 Generated with Claude Code