Fix feature card truncation and unequal sizing on subscription screens

Replace HStack layout with LazyVGrid for uniform card sizing, remove
lineLimit(1) to allow multiline subtitles, and add 1:1 aspect ratio
so all four feature cards are identical squares across all 12 themes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-28 13:50:47 -06:00
parent 3323c4a61c
commit 83cca395cf

View File

@@ -1976,9 +1976,13 @@ struct JournalPagesView: View {
struct FeatureCardsGrid: View { struct FeatureCardsGrid: View {
let style: PaywallStyle let style: PaywallStyle
private let columns = [
GridItem(.flexible(), spacing: 12),
GridItem(.flexible(), spacing: 12)
]
var body: some View { var body: some View {
VStack(spacing: 12) { LazyVGrid(columns: columns, spacing: 12) {
HStack(spacing: 12) {
FeatureCard( FeatureCard(
icon: "chart.line.uptrend.xyaxis", icon: "chart.line.uptrend.xyaxis",
title: "See Patterns", title: "See Patterns",
@@ -1993,8 +1997,6 @@ struct FeatureCardsGrid: View {
style: style, style: style,
accentIndex: 1 accentIndex: 1
) )
}
HStack(spacing: 12) {
FeatureCard( FeatureCard(
icon: "heart.circle", icon: "heart.circle",
title: "Health Sync", title: "Health Sync",
@@ -2012,7 +2014,6 @@ struct FeatureCardsGrid: View {
} }
} }
} }
}
struct FeatureCard: View { struct FeatureCard: View {
let icon: String let icon: String
@@ -2041,11 +2042,13 @@ struct FeatureCard: View {
Text(subtitle) Text(subtitle)
.font(.system(size: 11, weight: .medium)) .font(.system(size: 11, weight: .medium))
.foregroundColor(subtitleColor) .foregroundColor(subtitleColor)
.lineLimit(1) .fixedSize(horizontal: false, vertical: true)
} }
Spacer(minLength: 0)
} }
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(14) .padding(14)
.aspectRatio(1, contentMode: .fill)
.background(cardBackground) .background(cardBackground)
} }