Refactor ZStack layouts to .background(), add Year View accessibility IDs, triage QA test plan
Replace ZStack-with-gradient patterns with idiomatic .background() modifier across onboarding, customize, and settings views. Add accessibility identifiers to Year View charts for UI test automation. Mark 67 impossible-to-automate tests RED in QA plan and scaffold initial Year View and Settings onboarding tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,56 @@ struct OnboardingWrapup: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
ScrollView {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_1"))
|
||||
.padding(.top)
|
||||
.padding()
|
||||
.font(.title)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(formatter.string(from: onboardingData.date))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_3"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(onboardingData.inputDay.localizedValue)
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Button(action: {
|
||||
AnalyticsManager.shared.track(.onboardingCompleted(dayId: String(onboardingData.inputDay.rawValue)))
|
||||
completionClosure(onboardingData)
|
||||
}, label: {
|
||||
Text(String(localized: "onboarding_wrap_up_complete_button"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(hex: "31d158"))
|
||||
.padding()
|
||||
.background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(Color.white))
|
||||
.cornerRadius(10)
|
||||
})
|
||||
.padding([.top], 65)
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.frame(maxWidth: geometry.size.width)
|
||||
}
|
||||
.background {
|
||||
ZStack {
|
||||
Color(hex: "31d158")
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("great", bundle: .main)
|
||||
@@ -30,55 +78,8 @@ struct OnboardingWrapup: View {
|
||||
.accessibilityHidden(true)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
VStack {
|
||||
ScrollView {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_1"))
|
||||
.padding(.top)
|
||||
.padding()
|
||||
.font(.title)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(formatter.string(from: onboardingData.date))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_3"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(onboardingData.inputDay.localizedValue)
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Button(action: {
|
||||
AnalyticsManager.shared.track(.onboardingCompleted(dayId: String(onboardingData.inputDay.rawValue)))
|
||||
completionClosure(onboardingData)
|
||||
}, label: {
|
||||
Text(String(localized: "onboarding_wrap_up_complete_button"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(hex: "31d158"))
|
||||
.padding()
|
||||
.background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(Color.white))
|
||||
.cornerRadius(10)
|
||||
})
|
||||
.padding([.top], 65)
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.frame(maxWidth: geometry.size.width)
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "31d158"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user