Skip to content

Place the editor onboarding area in the folder's client area - #4556

Open
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:onboarding-uses-client-area
Open

HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:onboarding-uses-client-area

Conversation

@HeikoKlare

@HeikoKlare HeikoKlare commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What & Why

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-height CSS 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.

The onboarding area now fills exactly the space the folder leaves for its content, the same area an open editor gets. 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.

The area follows the folder's resize event. CTabFolder sends it for tab height and renderer changes since eclipse-platform/eclipse.platform.swt#3906, and CTabRendering sends it for padding changes since #4614. A change of the content area that sends no resize event, such as one of a third-party renderer that changes its trim and only repaints, is not followed. The ONBOARDING_TOP_SPACING and ONBOARDING_SPACING constants are removed: nothing uses them anymore, and the package is exported to friends only, so they are not API.

How to test

The onboarding area of an empty editor stack fills the folder's content area and stays there when the tab height or the padding changes at runtime. This needs an SDK whose SWT contains eclipse-platform/eclipse.platform.swt#3906. These steps have not been performed in an IDE yet.

  1. Close all editors so the onboarding area shows.
  2. Open the CSS Scratchpad (Window > Show View > Other > General > CSS Scratchpad) and apply .MPartStack { swt-tab-height: 60px; }. Without the change, the area stays at a fixed 30 px offset and overlaps the taller tab row. With the change, it starts right below the tab row.
  3. Apply CTabFolder { padding: 10px; }. With the change, the area moves in by the padding right away. The same rule moves the content of an open editor in the same way.
  4. Open an editor and close it again: the area comes back filling the content area.

testOnboardingFollowsPaddingOfCTabRendering fails without #4614.

Screenshots

An empty editor stack with a taller tab row (swt-tab-height: 50px) in the light theme on macOS, before and after the change. To show the bounds of the onboarding area, it is tinted with CTabFolder.EditorStack > Composite { background-color: #d6e6fa; }. Before, the area starts at the fixed 30 px offset and covers the lower part of the tab row. After, it fills exactly the folder's content area.

Before After
screenshot to be attached screenshot to be attached

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   867 files  ± 0     867 suites  ±0   57m 45s ⏱️ + 5m 35s
 8 644 tests + 4   8 404 ✅ + 4  240 💤 ±0  0 ❌ ±0 
21 801 runs  +12  21 128 ✅ +12  673 💤 ±0  0 ❌ ±0 

Results for commit 5698ff4. ± Comparison against base commit db49304.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the change aligning empty-stack onboarding with the tab folder’s client area.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@HeikoKlare
HeikoKlare force-pushed the onboarding-uses-client-area branch 2 times, most recently from a9fb6de to b13656d Compare December 3, 2026 10:59
@HeikoKlare
HeikoKlare force-pushed the onboarding-uses-client-area branch 3 times, most recently from a8e8981 to 95ac206 Compare December 5, 2026 16:34
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, also when the tab height, the renderer or its
padding changes at runtime.

The container is laid out in the folder's client area, which leaves out
the tabs and the frame the renderer draws, and is updated on the
folder's resize event. Following a new tab height or renderer relies on
CTabFolder sending that event for every change of its client area, which
SWT does since eclipse-platform/eclipse.platform.swt#3906, and following
a padding change relies on CTabRendering sending it, which
eclipse-platform#4614 adds. The ONBOARDING_TOP_SPACING
and ONBOARDING_SPACING constants are removed, as nothing uses them
anymore and the package is exported to friends only.

A client area change that sends no resize event, such as one of a
renderer that changes its trim on its own and only redraws, is not
followed.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@HeikoKlare
HeikoKlare force-pushed the onboarding-uses-client-area branch from 95ac206 to 5698ff4 Compare December 6, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants