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:
@@ -16,44 +16,35 @@ struct OnboardingTitle: View {
|
||||
@ObservedObject var onboardingData: OnboardingData
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
|
||||
Image("average", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2)
|
||||
.padding(.bottom, 55)
|
||||
.accessibilityHidden(true)
|
||||
|
||||
ScrollView {
|
||||
VStack{
|
||||
Text(String(localized: "onboarding_title_title"))
|
||||
.font(.title)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.trailing, .leading], 55)
|
||||
.padding([.top], 25)
|
||||
|
||||
ForEach(OnboardingTitle.titleOptions, id: \.self) { option in
|
||||
Button(action: {
|
||||
ScrollView {
|
||||
VStack{
|
||||
Text(String(localized: "onboarding_title_title"))
|
||||
.font(.title)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.trailing, .leading], 55)
|
||||
.padding([.top], 25)
|
||||
|
||||
ForEach(OnboardingTitle.titleOptions, id: \.self) { option in
|
||||
Button(action: {
|
||||
// onboardingData.title = option
|
||||
}, label: {
|
||||
Text(option)
|
||||
.font(.subheadline.weight(.bold))
|
||||
.foregroundColor(.white)
|
||||
.padding(10)
|
||||
.background(RoundedRectangle(cornerRadius: 10).stroke().foregroundColor(Color.white))
|
||||
.cornerRadius(10)
|
||||
})
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.padding([.top], 10)
|
||||
}
|
||||
|
||||
Text(String(localized: "onboarding_title_type_your_own"))
|
||||
.font(.body)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.top], 25)
|
||||
.padding([.trailing, .leading], 55)
|
||||
|
||||
}, label: {
|
||||
Text(option)
|
||||
.font(.subheadline.weight(.bold))
|
||||
.foregroundColor(.white)
|
||||
.padding(10)
|
||||
.background(RoundedRectangle(cornerRadius: 10).stroke().foregroundColor(Color.white))
|
||||
.cornerRadius(10)
|
||||
})
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.padding([.top], 10)
|
||||
}
|
||||
|
||||
Text(String(localized: "onboarding_title_type_your_own"))
|
||||
.font(.body)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.top], 25)
|
||||
.padding([.trailing, .leading], 55)
|
||||
|
||||
// TextField("Notification", text: $onboardingData.title)
|
||||
// .frame(height: 44)
|
||||
// .foregroundColor(Color(UIColor.white))
|
||||
@@ -63,12 +54,21 @@ struct OnboardingTitle: View {
|
||||
// .overlay(RoundedRectangle(cornerRadius: 16).stroke(Color.white))
|
||||
// .padding([.leading, .trailing], 75)
|
||||
// .padding([.top], 45)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.background {
|
||||
ZStack {
|
||||
Color.orange
|
||||
Image("average", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2)
|
||||
.padding(.bottom, 55)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
}
|
||||
.background(.orange)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user