ui: make Featured Trips carousel scroll edge-to-edge

Use contentMargins on horizontal ScrollView so cards start inset but
scroll to screen edges. Pad headers and error states individually.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-09 17:52:38 -06:00
parent 68cb8927cf
commit 5389fe3759
4 changed files with 12 additions and 5 deletions

View File

@@ -189,6 +189,7 @@ struct HomeView: View {
.foregroundStyle(Theme.warmOrange)
}
}
.padding(.horizontal, Theme.Spacing.md)
// Horizontal carousel grouped by region
ScrollView(.horizontal, showsIndicators: false) {
@@ -218,8 +219,8 @@ struct HomeView: View {
}
}
}
.padding(.horizontal, 1) // Prevent clipping
}
.contentMargins(.horizontal, Theme.Spacing.md, for: .scrollContent)
}
} else if let error = suggestedTripsGenerator.error {
// Error state
@@ -249,6 +250,7 @@ struct HomeView: View {
.background(Theme.cardBackground(colorScheme))
.clipShape(RoundedRectangle(cornerRadius: Theme.CornerRadius.medium))
}
.padding(.horizontal, Theme.Spacing.md)
}
}