From b67cf6855767d06d0d0f5c370129f4223a148b2a Mon Sep 17 00:00:00 2001 From: Conor Sinclair Date: Mon, 18 May 2026 18:23:01 +0200 Subject: [PATCH] Fix: Column honours fill_height: true (iOS) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .column case in MobNodeView only set maxWidth on its frame, so a Column with fill_height: true collapsed to the natural height of its children. This broke the canonical 'header / scroll / footer' layout — the footer sat directly under the last child instead of the parent's bottom edge. Pass maxHeight: .infinity when node.fillHeight is true (mirroring Box) and switch the frame alignment to .topLeading so children anchor at the top when the column flexes. Default behaviour (fill_height: false) is preserved — maxHeight stays nil and the VStack still hugs its content vertically. --- ios/MobRootView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ios/MobRootView.swift b/ios/MobRootView.swift index 8701aba6..dd955824 100644 --- a/ios/MobRootView.swift +++ b/ios/MobRootView.swift @@ -221,7 +221,12 @@ struct MobNodeView: View { VStack(alignment: .leading, spacing: 0) { ForEach(Array(node.childNodes.enumerated()), id: \.offset) { _, child in MobNodeView(node: child) } } - .frame(maxWidth: .infinity, alignment: .leading) + // fill_height: true lets a column flex to fill its parent so children + // with Spacer() or fill_height of their own can pin to the bottom. + // Without maxHeight the VStack hugs its content vertically and a + // trailing footer sits directly below the last child instead of the + // parent's bottom edge. + .frame(maxWidth: .infinity, maxHeight: node.fillHeight ? .infinity : nil, alignment: .topLeading) .padding(node.paddingEdgeInsets) .background(node.backgroundColor.map { Color($0) } ?? Color.clear) .ifLet(node.onTap) { view, tap in