Grow-to-fill sizing for panel placement recommendations#399
Open
Anton-Horn wants to merge 2 commits into
Open
Conversation
recommendPlacements keeps the free-rectangle packer (clustering near the focused node, tiling multiple spots, never spilling past a blocker) and changes only how each ghost is sized: along an axis pinned by a window on both sides (an interior gap) the ghost grows to fill that gap, up to the max size; an axis open on either side falls back to the panel's default extent. A gap below the minimum is still pruned. Updates the STANDARD PREFERRED test to the grow-to-fill contract and adds coverage for filling a bounded gap and defaulting in open space.
e138321 to
e692df2
Compare
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.
Makes the on-canvas placement ghosts grow to fill the space the layout leaves.
recommendPlacementskeeps the existing free-rectangle packer (recs cluster near the focused node, tile into multiple spots, and never spill past a blocking neighbour) and changes only how each ghost is sized:This unifies the old shrink-to-fit and adds growth past the default for wide bounded gaps.
Tests: updated the standard-size-in-a-gap test to the grow-to-fill contract, plus new coverage for filling a bounded gap and defaulting in open space. Full unit suite green (one unrelated local daemon/tarball test fails only in the local env).