From 45b18b5ea8d6938c443870432f83d0a594c4f12e Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sat, 4 Jul 2026 14:44:53 -0700 Subject: [PATCH] iPad: use the sheet-based layout at every size; drop forced min width The docked layout clipped on iPad even at iPad-Pro (regular) width because a large macOS min-width hint forced content wider than the screen and the header did not reflow. iPhone is not a target, so gate purely by platform: every iPad size uses the canvas-first / sheet layout, macOS keeps the docked layout. Drop the min-width/min-height frame on iOS so nothing is forced past the screen. Add an isNarrow (horizontalSizeClass == .compact) hook reserved for size-specific tuning of the smaller iPads / split view. Co-Authored-By: Claude Opus 4.8 --- Demo/ShoeGazeiOSDemo/Info.plist | 4 +++- .../ShoeGazeBuilderView.swift | 21 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Demo/ShoeGazeiOSDemo/Info.plist b/Demo/ShoeGazeiOSDemo/Info.plist index 6723281..9563314 100644 --- a/Demo/ShoeGazeiOSDemo/Info.plist +++ b/Demo/ShoeGazeiOSDemo/Info.plist @@ -30,7 +30,7 @@ UILaunchScreen UIRequiresFullScreen - + UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft @@ -40,6 +40,8 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown diff --git a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift index bbc17cc..c03b0fb 100644 --- a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift +++ b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift @@ -208,8 +208,21 @@ public struct ShoeGazeBuilderView: View { // MARK: - Body - /// `true` on narrow widths (iPhone, iPad portrait / split view) — the canvas-first layout. + /// `true` on iPad (any size) — the canvas-first layout with composition panels in sheets. The + /// docked desktop layout is macOS-only; on iPad it overflowed and clipped even at iPad-Pro + /// width, so every iPad size uses the sheet-based layout. macOS always uses the docked layout. private var isCompact: Bool { + #if os(iOS) + return true + #else + return false + #endif + } + + /// `true` on the smaller iPads / split-view widths, where even the canvas-first docked strip + /// (mixer + scope + Tempo/Tuner) is tight and more can move into sheets. Reserved for + /// size-specific tuning; `.regular` is a full-screen iPad. + private var isNarrow: Bool { #if os(iOS) return horizontalSizeClass == .compact #else @@ -220,9 +233,11 @@ public struct ShoeGazeBuilderView: View { public var body: some View { rootContent .padding(ShoeGazeBuilderView.outerPadding) + // A large min width is a macOS window sizing hint; on iPad it would force content wider than + // the screen and clip it, so the sheet-based iPad layout imposes no minimum width. .frame( - minWidth: ShoeGazeBuilderView.minWidth + ShoeGazeBuilderView.librarySidebarReserve, - minHeight: ShoeGazeBuilderView.minHeight + minWidth: isCompact ? nil : ShoeGazeBuilderView.minWidth + ShoeGazeBuilderView.librarySidebarReserve, + minHeight: isCompact ? nil : ShoeGazeBuilderView.minHeight ) .background( Color(