Gnome: anchor run toolbar to the editor column#134
Merged
Conversation
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
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.
Fixes #131
Problem
The floating run toolbar was an overlay child of the window-level
mainOverlay, positioned withhalign: end; margin-end: 360— the 360px were meant to clear the panel next to the editor. But the adjacent panel is anAdw.OverlaySplitViewsidebar with breakpoint-dependent width (max 344px medium, up to 800px ultra-wide) and a toggle:Fix
The toolbar is now an overlay anchored to the editor column itself (
Overlay centerOverlayaroundcenterColumnin 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.Overlayonly 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: endmeans the editor's right edge in RTL too — matching the LTR code content.The
runToolbarid 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.