Skip to content

Grow-to-fill sizing for panel placement recommendations#399

Open
Anton-Horn wants to merge 2 commits into
mainfrom
fix-position-recommendation
Open

Grow-to-fill sizing for panel placement recommendations#399
Anton-Horn wants to merge 2 commits into
mainfrom
fix-position-recommendation

Conversation

@Anton-Horn

@Anton-Horn Anton-Horn commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Makes the on-canvas placement ghosts grow to fill the space the layout leaves.

recommendPlacements keeps 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:

  • an axis pinned by a window on both sides (an interior gap) grows to fill that gap, up to the max size
  • an axis open on either side has nothing to size it, so it falls back to the panel's default extent
  • a gap below the minimum is still pruned (no recommendation)

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

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.
@Anton-Horn Anton-Horn force-pushed the fix-position-recommendation branch from e138321 to e692df2 Compare June 17, 2026 20:06
@Anton-Horn Anton-Horn changed the title Organic growth for panel placement recommendations Grow-to-fill sizing for panel placement recommendations Jun 17, 2026
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.

1 participant