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

@@ -44,21 +44,21 @@ struct OnboardingDay: View {
.frame(width: 120, height: 120)
Image(systemName: "calendar")
.font(.system(size: 44))
.font(.largeTitle)
.foregroundColor(.white)
}
.padding(.bottom, 32)
// Title
Text("Which day should\nyou rate?")
.font(.system(size: 28, weight: .bold, design: .rounded))
.font(.title.weight(.bold))
.foregroundColor(.white)
.multilineTextAlignment(.center)
.padding(.bottom, 12)
// Subtitle
Text("When you get your reminder, do you want to rate today or yesterday?")
.font(.system(size: 16, weight: .medium))
.font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.85))
.multilineTextAlignment(.center)
.padding(.horizontal, 40)
@@ -92,11 +92,11 @@ struct OnboardingDay: View {
// Tip
HStack(spacing: 12) {
Image(systemName: "lightbulb.fill")
.font(.system(size: 18))
.font(.headline)
.foregroundColor(.yellow)
Text("Tip: \"Yesterday\" works great for evening reminders")
.font(.system(size: 14, weight: .medium))
.font(.subheadline.weight(.medium))
.foregroundColor(.white.opacity(0.9))
}
.padding(.horizontal, 30)
@@ -124,7 +124,7 @@ struct DayOptionCard: View {
.frame(width: 46, height: 46)
Image(systemName: icon)
.font(.system(size: 20))
.font(.title3)
.foregroundColor(isSelected ? Color(hex: "4facfe") : .white)
}
.accessibilityHidden(true)
@@ -132,15 +132,15 @@ struct DayOptionCard: View {
// Text
VStack(alignment: .leading, spacing: 3) {
Text(title)
.font(.system(size: 17, weight: .semibold))
.font(.body.weight(.semibold))
.foregroundColor(isSelected ? Color(hex: "4facfe") : .white)
Text(subtitle)
.font(.system(size: 13))
.font(.caption)
.foregroundColor(isSelected ? Color(hex: "4facfe").opacity(0.8) : .white.opacity(0.8))
Text(example)
.font(.system(size: 11, weight: .medium))
.font(.caption2.weight(.medium))
.foregroundColor(isSelected ? Color(hex: "4facfe").opacity(0.6) : .white.opacity(0.6))
.lineLimit(1)
.minimumScaleFactor(0.8)
@@ -151,7 +151,7 @@ struct DayOptionCard: View {
// Checkmark
if isSelected {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 22))
.font(.title3)
.foregroundColor(Color(hex: "4facfe"))
.accessibilityHidden(true)
}