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

@@ -31,7 +31,7 @@ struct OnboardingStyle: View {
.frame(width: 100, height: 100)
Image(systemName: "paintpalette.fill")
.font(.system(size: 40))
.font(.largeTitle)
.foregroundColor(.white)
}
.padding(.top, 40)
@@ -39,13 +39,13 @@ struct OnboardingStyle: View {
// Title
Text("Make it yours")
.font(.system(size: 28, weight: .bold, design: .rounded))
.font(.title.weight(.bold))
.foregroundColor(.white)
.padding(.bottom, 8)
// Subtitle
Text("Choose your favorite style")
.font(.system(size: 16, weight: .medium))
.font(.body.weight(.medium))
.foregroundColor(.white.opacity(0.85))
.padding(.bottom, 20)
@@ -57,7 +57,7 @@ struct OnboardingStyle: View {
// Icon Style Section
VStack(alignment: .leading, spacing: 10) {
Text("Icon Style")
.font(.system(size: 14, weight: .semibold))
.font(.subheadline.weight(.semibold))
.foregroundColor(.white.opacity(0.9))
.padding(.horizontal, 24)
@@ -82,7 +82,7 @@ struct OnboardingStyle: View {
// Color Theme Section
VStack(alignment: .leading, spacing: 10) {
Text("Mood Colors")
.font(.system(size: 14, weight: .semibold))
.font(.subheadline.weight(.semibold))
.foregroundColor(.white.opacity(0.9))
.padding(.horizontal, 24)
@@ -105,9 +105,9 @@ struct OnboardingStyle: View {
// Hint
HStack(spacing: 8) {
Image(systemName: "arrow.left.arrow.right")
.font(.system(size: 14))
.font(.subheadline)
Text("You can change these anytime in Customize")
.font(.system(size: 13, weight: .medium))
.font(.caption.weight(.medium))
}
.foregroundColor(.white.opacity(0.7))
.padding(.top, 20)
@@ -130,14 +130,15 @@ struct OnboardingStylePreview: View {
.aspectRatio(contentMode: .fit)
.frame(width: 44, height: 44)
.foregroundColor(moodTint.color(forMood: .good))
.accessibilityLabel(Mood.good.strValue)
VStack(alignment: .leading, spacing: 4) {
Text("Wednesday - 10th")
.font(.system(size: 17, weight: .semibold))
.font(.body.weight(.semibold))
.foregroundColor(.white)
Text(Mood.good.strValue)
.font(.system(size: 14))
.font(.subheadline)
.foregroundColor(.white.opacity(0.8))
}
@@ -167,6 +168,7 @@ struct OnboardingIconPackOption: View {
.aspectRatio(contentMode: .fit)
.frame(width: 24, height: 24)
.foregroundColor(moodTint.color(forMood: mood))
.accessibilityLabel(mood.strValue)
}
}
.padding(.horizontal, 16)