Skip to content

numpad issue resolved#314

Merged
rtk-rnjn merged 1 commit intomainfrom
profile-me-something-fixed
Mar 26, 2026
Merged

numpad issue resolved#314
rtk-rnjn merged 1 commit intomainfrom
profile-me-something-fixed

Conversation

@rtk-rnjn
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 23:23
@github-actions github-actions bot added the swiftformat-pass Swiftformat Pass - Should only be auto assigned label Mar 26, 2026
@github-actions github-actions bot added the swiftlint-pass Swiftlint Pass - Should only be auto assigned label Mar 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the onboarding OTP entry behavior (aiming to address a number-pad submission/dismissal issue) and adjusts in-app support contact details in Profile and Legal/Compliance screens.

Changes:

  • Adds onSubmit handling and a .done submit label to the hidden OTP text field, and dismisses focus once the OTP reaches the expected length.
  • Makes “Connect with Us” in Profile open a mailto: link to support.
  • Updates the displayed contact email (and accessibility label) in the Global Rights screen.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift Adds openURL usage and a tap action to open a support mailto link from the footer.
MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/GlobalRightsView.swift Replaces the contact email string and updates its accessibility label.
MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift Adds submit handling and focus dismissal logic for the OTP input field.

}
}
}
.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.
Comment on lines +112 to +120
.onSubmit {
Task {
do {
try await handleSubmit()
} catch {
controlState.error = error
}
}
}
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.
.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.
Comment on lines +63 to +71
Text("support.momcare@vision-labs.site")
.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")
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.
Comment on lines 122 to +130
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)
}
}
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.
Comment on lines +125 to +128
.onTapGesture {
let url = "mailto:support.momcare@vision-labs.site"
if let mailURL = URL(string: url) {
openURL(mailURL)
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.
@rtk-rnjn rtk-rnjn merged commit 2978405 into main Mar 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-pass swiftformat-pass Swiftformat Pass - Should only be auto assigned swiftlint-pass Swiftlint Pass - Should only be auto assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants