-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Zip Code validation from Add a payment card page #53178
Remove Zip Code validation from Add a payment card page #53178
Conversation
@@ -286,7 +282,6 @@ function PaymentCardForm({ | |||
label={translate('common.zip')} | |||
aria-label={translate('common.zip')} | |||
role={CONST.ROLE.PRESENTATION} | |||
inputMode={CONST.INPUT_MODE.NUMERIC} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this line because on mWeb platforms this would only allow numeric input which would restrict users from typing UK Zip Codes what contain characters and numbers (ex. SW8 4LT). The issue was present on iOS: mWeb as well, here's an example from Android: mWeb before and after removing the line:
Before | After |
---|---|
![]() |
![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense, thanks
Note No testing was done on Native platforms because the Add a payment card page is not available on native: App/src/pages/settings/Subscription/PaymentCard/index.native.tsx Lines 5 to 15 in c4ff235
|
@getusha It has been 5 days without any updates regarding review - any updates on this ? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/a Android: mWeb ChromeScreen.Recording.2024-12-03.at.5.20.50.in.the.afternoon.moviOS: NativeN/a iOS: mWeb SafariScreen.Recording.2024-12-03.at.5.21.24.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-12-03.at.5.15.47.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-12-03.at.5.26.43.in.the.afternoon.mov |
@@ -165,10 +165,6 @@ function PaymentCardForm({ | |||
errors.addressStreet = translate(label.error.addressStreet); | |||
} | |||
|
|||
if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a comment to prevent others reverting this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change will be visible in blame which will lead to this PR / issue and it's self explanatory that we removed the specific Zip Code validation for time being, the explanation being visible in the PRs description.
Updated postcode input label to match the label found in the form on Settings > Profile > Private > Address , as requested in Expensify#52642 (comment).
@danieldoglas The PR is ready to be merged, the latest commit was an input labal change request asked last minute in the issue #52642 (comment). |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.0.72-0 🚀
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.0.72-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.72-1 🚀
|
Explanation of Change
After getting feedback from the team in #52642 (comment), we decided to completely remove Zip Code validation in order to aligh with OD, meaning the only validation left in the Payment Card form for the Zip Code is that the field is required.
Fixed Issues
$ #52642
PROPOSAL: #52642 (comment)
Tests
Offline tests
Same as QA Steps.
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Add a payment card page is not available on native:
App/src/pages/settings/Subscription/PaymentCard/index.native.tsx
Lines 5 to 15 in c4ff235
Android: mWeb Chrome
screen-20241126-154123.mp4
iOS: Native
Add a payment card page is not available on native:
App/src/pages/settings/Subscription/PaymentCard/index.native.tsx
Lines 5 to 15 in c4ff235
iOS: mWeb Safari
ios-mweb.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov