- 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>
76 lines
2.7 KiB
Swift
76 lines
2.7 KiB
Swift
//
|
|
// OnboardingCustomizeOne.swift
|
|
// Feels (iOS)
|
|
//
|
|
// Created by Trey Tartt on 4/5/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct OnboardingCustomizeOne: View {
|
|
@ObservedObject var onboardingData: OnboardingData
|
|
|
|
var formatter: DateFormatter {
|
|
let dateFormatter = DateFormatter()
|
|
dateFormatter.timeStyle = .short
|
|
return dateFormatter
|
|
}
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
GeometryReader { geometry in
|
|
VStack {
|
|
Spacer()
|
|
Image("good", bundle: .main)
|
|
.foregroundColor(Color(UIColor.darkText))
|
|
.opacity(0.04)
|
|
.scaleEffect(1.2, anchor: .trailing)
|
|
.accessibilityHidden(true)
|
|
Spacer()
|
|
}
|
|
|
|
|
|
ScrollView {
|
|
VStack(alignment: .leading) {
|
|
Text(String(localized: "onboarding_title_customize_one_title"))
|
|
.font(.title)
|
|
.padding()
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.foregroundColor(.black)
|
|
|
|
Text(String(localized: "onboarding_title_customize_one_section_one_title"))
|
|
.font(.title3)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.padding()
|
|
.foregroundColor(.black)
|
|
.multilineTextAlignment(.leading)
|
|
IconPickerView()
|
|
|
|
Text(String(localized: "onboarding_title_customize_one_section_two_title"))
|
|
.font(.title3)
|
|
.padding()
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.foregroundColor(.black)
|
|
|
|
DayFilterPickerView()
|
|
|
|
Text(String(localized: "onboarding_title_customize_one_section_two_note"))
|
|
.font(.title3)
|
|
.padding()
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
.foregroundColor(.black)
|
|
}
|
|
}
|
|
.padding()
|
|
}
|
|
}
|
|
.background(Color(hex: "ffd709"))
|
|
}
|
|
}
|
|
|
|
struct OnboardingCustomizeOne_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
OnboardingCustomizeOne(onboardingData: OnboardingData())
|
|
}
|
|
}
|