feat(ui): pre-board, board and post-board in one vertical scroller
The board canvas used to fill the remaining height and centre itself, pinning the pre-board strip above and the post-board strip below — so a tall pre/post chain clipped instead of scrolling, and the three sections never read as one signal path. Wrap pre-board → board → post-board in a single vertical ScrollView so the whole path scrolls top-to-bottom as one page, on macOS and iOS alike. The transport / palette / routing header stays fixed above it. BoardFlowView gains a `sizesToContent` mode: it sizes to its chain height and scrolls only horizontally, so it nests inside the outer vertical scroller with no competing vertical scroll (a tall parallel split simply grows the page). The default fill-and-centre behaviour is unchanged for any other caller. Verified on the iPad simulator: sections stack in signal-flow order and the board still scrolls horizontally through a long chain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -726,9 +726,18 @@ public struct ShoeGazeBuilderView: View {
|
||||
}
|
||||
Divider().overlay(Color.white.opacity(ShoeGazeBuilderView.dividerOpacity))
|
||||
ControlMappingLegend()
|
||||
preBoardStrip
|
||||
boardArea
|
||||
postBoardStrip
|
||||
// Pre-board, the board canvas and post-board share a single vertical scroller, so the whole
|
||||
// signal path reads top-to-bottom as one page (on macOS and iOS alike) instead of pinning
|
||||
// the board and clipping the pre/post strips.
|
||||
ScrollView(.vertical, showsIndicators: true) {
|
||||
VStack(alignment: .leading, spacing: ShoeGazeBuilderView.sectionSpacing) {
|
||||
preBoardStrip
|
||||
boardArea
|
||||
postBoardStrip
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.frame(maxHeight: .infinity)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
// Make the undo coordinator reachable to every board / palette subview so their structural
|
||||
@@ -1598,13 +1607,11 @@ public struct ShoeGazeBuilderView: View {
|
||||
// MARK: - Board area
|
||||
|
||||
private var boardArea: some View {
|
||||
// Vertically center the signal-flow board in the available space.
|
||||
VStack(spacing: 0) {
|
||||
Spacer(minLength: 0)
|
||||
BoardFlowView(shoeGaze: shoeGaze, boardIndex: clampedBoardIndex)
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
// Content-sized so it flows inside the shared pre/board/post vertical scroller (scrolls
|
||||
// horizontally for a long chain; a tall parallel split grows the page). No vertical centering —
|
||||
// the board sits in signal-flow order between the pre-board and post-board strips.
|
||||
BoardFlowView(shoeGaze: shoeGaze, boardIndex: clampedBoardIndex, sizesToContent: true)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
/// Performs a routing action from the palette against the selected board.
|
||||
|
||||
Reference in New Issue
Block a user