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

@@ -277,6 +277,7 @@ struct EntryDetailView: View {
.aspectRatio(contentMode: .fit)
.frame(width: 34, height: 34)
.foregroundColor(.white)
.accessibilityLabel(currentMood.strValue)
}
.shadow(color: moodColor.opacity(0.4), radius: 8, x: 0, y: 4)
@@ -304,8 +305,12 @@ struct EntryDetailView: View {
ForEach(Mood.allValues) { mood in
Button {
// Update local state immediately for instant feedback
withAnimation(.easeInOut(duration: 0.15)) {
if UIAccessibility.isReduceMotionEnabled {
selectedMood = mood
} else {
withAnimation(.easeInOut(duration: 0.15)) {
selectedMood = mood
}
}
// Then persist the change
onMoodUpdate(mood)
@@ -320,6 +325,7 @@ struct EntryDetailView: View {
.aspectRatio(contentMode: .fit)
.frame(width: 28, height: 28)
.foregroundColor(currentMood == mood ? .white : .gray)
.accessibilityLabel(mood.strValue)
)
Text(mood.strValue)