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

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

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 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 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 CTabRendering has the same problem, but setTabHeight does not repaint an empty folder, at least on Windows, so the paint check cannot catch it. eclipse-platform/eclipse.platform.swt#3906 makes CTabFolder send the resize event for tab height and renderer changes, which covers that case and is tested there.

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.

Testing

StackRendererTest checks that the onboarding area matches the folder's client area, also after opening an editor. New tests change the tab height (default renderer), the CTabRendering padding and the renderer itself without resizing the folder, and check that the area follows the client area. The CTabRendering tests 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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   867 files  ±0     867 suites  ±0   57m 24s ⏱️ - 7m 50s
 8 610 tests +3   8 370 ✅ +3  240 💤 ±0  0 ❌ ±0 
21 699 runs  +9  21 026 ✅ +9  673 💤 ±0  0 ❌ ±0 

Results for commit b13656d. ± Comparison against base commit 6863d5e.

♻️ 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 from 72b47ff to a9fb6de Compare December 1, 2026 07:30
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
HeikoKlare force-pushed the onboarding-uses-client-area branch from a9fb6de to b13656d Compare December 3, 2026 10:59
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