Skip to content

Gnome: anchor run toolbar to the editor column#134

Merged
JumpLink merged 1 commit into
mainfrom
fix/131-toolbar-editor-anchor
Jun 12, 2026
Merged

Gnome: anchor run toolbar to the editor column#134
JumpLink merged 1 commit into
mainfrom
fix/131-toolbar-editor-anchor

Conversation

@JumpLink

Copy link
Copy Markdown
Owner

Fixes #131

Problem

The floating run toolbar was an overlay child of the window-level mainOverlay, positioned with halign: end; margin-end: 360 — the 360px were meant to clear the panel next to the editor. But the adjacent panel is an Adw.OverlaySplitView sidebar with breakpoint-dependent width (max 344px medium, up to 800px ultra-wide) and a toggle:

  • Medium layout: sidebar closed, but the 360px were still reserved → toolbar floated awkwardly mid-window.
  • Ultra-wide layout: sidebar wider than 360px → toolbar floated on top of the tutorial text.

Fix

The toolbar is now an overlay anchored to the editor column itself (Overlay centerOverlay around centerColumn in the three-column layout), with plain 12px margins. It sticks to the editor's edge in every breakpoint and both text directions — no magic margins left.

Input is unaffected: Gtk.Overlay only intercepts events within the overlay child's own bounds (same mechanism as the per-code-block copy button), the editor receives clicks and keyboard input everywhere else.

The toolbar keeps its LTR pin from #126, so halign: end means the editor's right edge in RTL too — matching the LTR code content.

The runToolbar id and the breakpoint visibility setters are unchanged; the mobile layout still uses the main button instead.

Verification

Manually tested in German and Hebrew (RTL) at all four breakpoints (mobile / medium with sidebar open+closed / wide / ultra-wide ≥1600px): toolbar stays at the editor's top right edge; no overlap with the tutorial panel. yarn format, yarn check:format, app-gnome build (blueprint validation) pass.

The floating run toolbar was a window-level overlay positioned
with a fixed margin-end of 360px to clear the adjacent panel.
That breaks as soon as the panel next to it changes: in the
medium layout the sidebar is toggled away but the space was still
reserved, and in the ultra-wide layout the sidebar is wider than
360px so the toolbar floated above the tutorial text (#131).

Anchor the toolbar to an overlay around the editor column itself,
so it sticks to the editor edge in every breakpoint and text
direction without any magic margins.

Fixes #131
@JumpLink JumpLink merged commit b2bb057 into main Jun 12, 2026
3 checks passed
@JumpLink JumpLink deleted the fix/131-toolbar-editor-anchor branch June 12, 2026 07:02
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.

toolbar awkwardly placed relative to tutorial panel

1 participant