Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ struct OTPScreenView: View {
.accessibilityHidden(true)

hiddenOTPTextField
.onSubmit {
Task {
do {
try await handleSubmit()
} catch {
controlState.error = error
}
}
}
Comment on lines +112 to +120
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OTP submit flow is now duplicated in both verifyButton and the new onSubmit handler (creating separate Task { do/try/await ... } blocks). Consider extracting this into a single private submitOTP() helper to keep behavior consistent and avoid future drift.

Copilot uses AI. Check for mistakes.
.submitLabel(.done)
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onSubmit/.submitLabel(.done) won’t be triggered/shown for a .keyboardType(.numberPad) field (number pad has no return/submit key). If the goal is to let users dismiss/submit from the keypad, add a keyboard toolbar “Done/Verify” button (or change the keyboard type to one that supports submit) and invoke the same submit path from there.

Suggested change
.submitLabel(.done)
.submitLabel(.done)
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button("Verify") {
isFieldFocused = false
Task {
do {
try await handleSubmit()
} catch {
controlState.error = error
}
}
}
}
}

Copilot uses AI. Check for mistakes.
}
.contentShape(Rectangle())
.onTapGesture {
Expand All @@ -132,6 +142,9 @@ struct OTPScreenView: View {
.otpTextFieldStyle(isFocused: $isFieldFocused)
.onChange(of: otpString) { _, newValue in
sanitizeOTP(newValue)
if otpString.count == otpLength {
isFieldFocused = false
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ struct GlobalRightsView: View {
.foregroundColor(.secondary)
.multilineTextAlignment(.center)

Text("privacy@momcare.com")
Text("support.momcare@vision-labs.site")
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copy says requests go to a “dedicated privacy team”, but the contact address shown is now a general support email. Either update the wording to match the support contact, or use a privacy-specific email address so the UI text remains accurate.

Copilot uses AI. Check for mistakes.
.font(.headline)
.fontWeight(.semibold)
.foregroundColor(accentColor)
.padding(.vertical, 12)
.padding(.horizontal, 24)
.background(Color.gray.opacity(0.1))
.clipShape(Capsule())
.accessibilityLabel("Contact email: privacy@momcare.com")
.accessibilityLabel("Contact email: support.momcare@vision-labs.site")
Comment on lines +63 to +71
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title indicates a “numpad issue” fix, but this PR also changes the public contact email address and adds a mailto action in Profile. If these are intentional, consider updating the PR title/description or splitting into a separate PR so review and release notes match the actual scope.

Copilot uses AI. Check for mistakes.
}
.padding(.vertical, 24)
}
Expand Down
7 changes: 7 additions & 0 deletions MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ struct ProfileView: View {

@EnvironmentObject private var authenticationService: AuthenticationService
@EnvironmentObject private var controlState: ControlState
@Environment(\.openURL) private var openURL

private var footerView: some View {
VStack(spacing: 4) {
Expand All @@ -121,6 +122,12 @@ struct ProfileView: View {
Text("Connect with Us")
.foregroundStyle(Color("primaryAppColor"))
.fontWeight(.medium)
.onTapGesture {
let url = "mailto:support.momcare@vision-labs.site"
if let mailURL = URL(string: url) {
openURL(mailURL)
Comment on lines +125 to +128
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The support email address is hardcoded here as a mailto: string, and the same email is also embedded in GlobalRightsView. To avoid the two screens drifting out of sync later, consider centralizing the address (e.g., a shared constant) and building the mailto: URL from that constant.

Copilot uses AI. Check for mistakes.
}
}
Comment on lines 122 to +130
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text("Connect with Us") is made tappable via onTapGesture, which doesn’t expose proper button/link semantics to accessibility (VoiceOver won’t announce it as a link/button, and it won’t be discoverable via Switch Control/keyboard navigation). Prefer using a Button or Link styled as plain text, and add appropriate accessibility label/traits.

Suggested change
Text("Connect with Us")
.foregroundStyle(Color("primaryAppColor"))
.fontWeight(.medium)
.onTapGesture {
let url = "mailto:support.momcare@vision-labs.site"
if let mailURL = URL(string: url) {
openURL(mailURL)
}
}
Button {
let urlString = "mailto:support.momcare@vision-labs.site"
if let mailURL = URL(string: urlString) {
openURL(mailURL)
}
} label: {
Text("Connect with Us")
.foregroundStyle(Color("primaryAppColor"))
.fontWeight(.medium)
}
.buttonStyle(.plain)
.accessibilityLabel("Connect with MomCare support")
.accessibilityHint("Opens your email app to contact support.")

Copilot uses AI. Check for mistakes.
}
.frame(maxWidth: .infinity)
.multilineTextAlignment(.center)
Expand Down
Loading