From 323988af7bdefc3103015b174d79293288f87dcb Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sat, 1 Aug 2026 15:52:19 -0700 Subject: [PATCH] fix(ui): looper card no longer stretches to the canvas height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flow canvas offers the pedal row its full viewport height (BoardFlowView sets the content minHeight to the viewport). The looper's columnar layout had Spacer(minLength: 0) inside its left and center columns, making those VStacks greedy vertically, so the looper card stretched to fill the offered height — pinning the Level/Bypass footer to the bottom and leaving a large empty gap in the middle. Remove both spacers so each column sizes to its content, and pin the columnar content to intrinsic height with fixedSize(vertical:). Other pedals were unaffected (their default layout has no vertical spacer). Co-Authored-By: Claude Opus 4.8 --- Sources/LyrebirdShoeGazeUI/PedalView.swift | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Sources/LyrebirdShoeGazeUI/PedalView.swift b/Sources/LyrebirdShoeGazeUI/PedalView.swift index 4b22304..524b6b2 100644 --- a/Sources/LyrebirdShoeGazeUI/PedalView.swift +++ b/Sources/LyrebirdShoeGazeUI/PedalView.swift @@ -560,20 +560,20 @@ public struct PedalView: View { namePlate HStack(alignment: .top, spacing: PedalView.looperColumnSpacing) { // Left column: timeline, then the Free/Sync switch, then the Reset footswitch. + // No trailing Spacer — the flow canvas offers the row its full viewport height, + // and a greedy Spacer here would stretch the whole card to fill it (leaving a + // large empty gap). Each column sizes to its content, like every other pedal. VStack(spacing: PedalView.sectionSpacing) { LooperTimelineView(pedal: looper) switchRow looperResetCell - Spacer(minLength: 0) } .frame(width: PedalView.looperTimelineColumnWidth) - // Centre column: the four effect knobs (2×2), with the Level + Bypass footer at the - // bottom. The Mix slot is reserved (empty) so Bypass stays horizontally centred, - // matching a normal pedal's footer. + // Centre column: the four effect knobs (2×2), with the Level + Bypass footer + // directly beneath (no greedy Spacer — see the left column note). VStack(spacing: PedalView.sectionSpacing) { looperEffectKnobs(columns: 2) - Spacer(minLength: 0) looperFooter } @@ -583,6 +583,9 @@ public struct PedalView: View { } PedalMappingStrip(pedal: pedal, map: controlMappingMap) } + // Pin to intrinsic height so the enclosure hugs its content even though the flow + // canvas offers the row its full viewport height. + .fixedSize(horizontal: false, vertical: true) } /// The looper's effect knobs (everything except the trailing `Mix` / `Level`) laid out in