Repository navigation
fix(layout): the Both sides gap never shrinks to nothing - #62
Merged
thepathless merged 1 commit intoOct 12, 2026
Merged
Conversation
A Row skips a zero-width child together with the spacing after it. With a small resting gap, magnification growth used the gap up, its width hit 0 and the right group jumped left by one row spacing before carrying on. The gap now bottoms out at one device pixel (one logical pixel without a scale), so the right group keeps moving the way it was.
priard
added a commit
to priard/omadock
that referenced
this pull request
Oct 11, 2026
Owner
|
🎉 Thank you so much for this contribution, @priard! Really appreciate the care you put into it. ✨ Verified on experimental — static gates, unit suites (239 node + 116 python) and the full live dock battery all green, including the marks-centering suite — and merged. Your work is credited in the changelog. 🙏🚀 |
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
In Both sides, the gap between the left group and the right group shrinks as magnification grows the icons. When the resting gap is small (a row that nearly fills the width), the growth uses the gap up. Its width then reaches 0, and the right group jumps left by one row spacing before it carries on. This was the one minor left open from the #49 review.
Cause
A
Rowdoes not lay out a child with zero width, and it drops the spacing after that child too. So the right group goes fromgapX + gap + spacingtogapXin one frame.Fix
DockLayout.spreadGapbottoms out at one device pixel (one logical pixel without a scale) instead of 0. The Row keeps the gap item and its spacing, so the right group keeps moving the way it was. At rest nothing changes, except in a gap already narrower than one pixel.Not in this PR
Once the growth is larger than the whole resting gap, the right group still runs past the card's right edge. Panel with Center or Right does the same near full width, where
rowOffsetstops at 0. Keeping it on the card would mean moving the row left during magnification. That would shiftpointerXagainst the resting centres, and the wave would start chasing itself. I left it as is; it needs a row that nearly fills the screen.Testing
tests/unit/layout.test.mjs: the floor in logical and device pixels, plus a sweep that pushes the left group through the moment the gap runs out. On the old code the sweep catches the 6 px jump; with the fix it passes.structure-check.py.tests/live/layout.shpasses and the smoke test is clean.