From 3b4e7b283abc396101333ee1124478cdc1767cd7 Mon Sep 17 00:00:00 2001 From: pepaskopec-blip Date: Wed, 7 Oct 2026 14:31:44 +0200 Subject: [PATCH] Keep the home layout intact when the changelog is showing. The subject grid no longer sits in a second scroller, so a tall what's-new card does not swallow scrolling or stretch the tiles. Co-authored-by: Cursor --- ios/Graduately/UI/Components.swift | 49 +++++++++++++++++------------- ios/Graduately/UI/Screens.swift | 21 ++----------- 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/ios/Graduately/UI/Components.swift b/ios/Graduately/UI/Components.swift index 53523b9..ebd2ec8 100644 --- a/ios/Graduately/UI/Components.swift +++ b/ios/Graduately/UI/Components.swift @@ -61,6 +61,9 @@ struct MacFillGrid: View { var minHeight: CGFloat = 148 var spacing: CGFloat = 16 var inset: CGFloat = 28 + /// Home embeds the grid in its own scroll view. A second scroller here + /// swallows the wheel once a banner (the changelog) makes the page taller. + var scrolls = true @ViewBuilder var content: (Int) -> Content var body: some View { @@ -74,32 +77,36 @@ struct MacFillGrid: View { let tileH = max(minHeight, (gridH - spacing * CGFloat(max(rows - 1, 0))) / CGFloat(rows)) let tileW = (innerW - spacing * CGFloat(max(cols - 1, 0))) / CGFloat(max(cols, 1)) let lastCount = count - (rows - 1) * cols - ScrollView { - VStack(spacing: spacing) { - ForEach(0.. 1 - HStack(spacing: spacing) { - ForEach(0.. 1 + HStack(spacing: spacing) { + ForEach(0.. 0 { Spacer().frame(height: 4) } - #if os(macOS) - if lines.count >= 4 { - LazyVGrid( - columns: [ - GridItem(.flexible(minimum: 240), spacing: 22, alignment: .topLeading), - GridItem(.flexible(minimum: 240), spacing: 22, alignment: .topLeading), - ], - alignment: .leading, - spacing: 6 - ) { - lineList - } - } else { - VStack(alignment: .leading, spacing: 4) { lineList } - } - #else VStack(alignment: .leading, spacing: 4) { lineList } - #endif } }