Fix widget layout clipping and add comprehensive widget previews

- Fix LargeVotingView mood icons getting clipped at edges by using
  flexible HStack spacing with maxWidth: .infinity
- Fix VotingView medium layout with smaller icons and even distribution
- Add comprehensive #Preview macros for all widget states:
  - Vote widget: small/medium, voted/not voted, all mood states
  - Timeline widget: small/medium/large with various data states
- Reduce icon sizes and padding to fit within widget bounds
- Update accessibility labels and hints across views

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-24 09:53:40 -06:00
parent 5f7d909d62
commit be84825aba
33 changed files with 10467 additions and 9725 deletions

View File

@@ -34,14 +34,14 @@ struct OnboardingSubscription: View {
.frame(width: 120, height: 120)
Image(systemName: "crown.fill")
.font(.system(size: 48))
.font(.largeTitle)
.foregroundColor(.yellow)
}
.padding(.bottom, 24)
// Title
Text("Unlock the Full\nExperience")
.font(.system(size: 28, weight: .bold, design: .rounded))
.font(.title.weight(.bold))
.foregroundColor(.white)
.multilineTextAlignment(.center)
.padding(.bottom, 8)
@@ -101,10 +101,10 @@ struct OnboardingSubscription: View {
}) {
HStack {
Image(systemName: "sparkles")
.font(.system(size: 18, weight: .semibold))
.font(.headline.weight(.semibold))
Text("Get Personal Insights")
.font(.system(size: 18, weight: .bold))
.font(.headline.weight(.bold))
}
.foregroundColor(Color(hex: "11998e"))
.frame(maxWidth: .infinity)
@@ -125,7 +125,7 @@ struct OnboardingSubscription: View {
completionClosure(onboardingData)
}) {
Text("Maybe Later")
.font(.system(size: 16, weight: .medium))
.font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.8))
}
.accessibilityLabel(String(localized: "Maybe Later"))
@@ -154,18 +154,18 @@ struct BenefitRow: View {
var body: some View {
HStack(spacing: 16) {
Image(systemName: icon)
.font(.system(size: 22))
.font(.title3)
.foregroundColor(.white)
.frame(width: 40)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
Text(title)
.font(.system(size: 16, weight: .semibold))
.font(.body.weight(.semibold))
.foregroundColor(.white)
Text(description)
.font(.system(size: 13))
.font(.caption)
.foregroundColor(.white.opacity(0.8))
}