-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-02-20] [$250] Address – Incorrect error message appear when enter Cyrillic letters into Zip field #34668
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @jasperhuangg ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Address - Incorrect error message appear when enter Cyrillic letters into Zip field What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?we can add an empty object as the default value for the const [phrase, variables = {}] = Array.isArray(message) ? message : [message]; alternativelywe can modify the zipcode translation above to: App/src/components/AddressForm.js Line 106 in 9208c95
futhermore this snippet could be refactored to: const trimmedZip = values.zipPostCode.trim().toUpperCase();
const zipValidation = countrySpecificZipRegex ? countrySpecificZipRegex.test(trimmedZip) : CONST.GENERIC_ZIP_CODE_REGEX.test(trimmedZip);
const isRequiredFulfilled = ValidationUtils.isRequiredFulfilled(values.zipPostCode.trim());
if (!zipValidation) {
errors.zipPostCode = isRequiredFulfilled
? ['privatePersonalDetails.error.incorrectZipFormat', { zipFormat: countryZipFormat }]
: 'common.error.fieldRequired';
} |
Job added to Upwork: https://www.upwork.com/jobs/~01ae2a56928644ce4f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Upwork job price has been updated to $250 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Address – Incorrect error message appear when enter Cyrillic letters into Zip field What is the root cause of that problem?The root cause of the problem is right now error message is having App/src/components/AddressForm.js Lines 111 to 112 in 4da7fda
What changes do you think we should make in order to solve the problem?Here we need to enter the error message that we want to display i.e. Screenshot of the output What alternative solutions did you explore? (Optional)The alternative approach can be updating the App/src/components/AddressForm.js Line 106 in 4da7fda
This will generate same output as this image. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Incorrect error message ( privatePersonalDetails.error.incorrectZipFormat ) appear when enter Cyrillic letters into Zip/Postcode field What is the root cause of that problem?This is regression from this change https://github.com/Expensify/App/pull/29742/files#diff-fe6e9abcee003c3390e38c0210d32ff889767cfab2c007837ed64c02147162e1 Earlier the After that regression change, the If we put the logs here, we can see the runtime error. And it will fallback to using the What changes do you think we should make in order to solve the problem?Default the
So if there's no Alternatively, we can remove the rest What alternative solutions did you explore? (Optional)Since
So that it's clear the We should do the same for all translation params that are "optional" as in this case. |
I have asked if the change in the 3rd argument (the phrase parameters) is intended or not here https://github.com/Expensify/App/pull/29742/files#r1459284554. If we don't really need it we can just revert into using an object. Otherwise we'd add the missing parameters for translation that takes parameters. |
@abzokhattab Thanks for the proposal. I didn't understand your RCA can you please rephrase? |
@AnshuAgarwal24 Thanks for the proposal. Your RCA is not correct. |
@dukenv0307 Thanks for the proposal. Your RCA is correct. As for the solution I don't think it makes sense to define a default value for a multi-arguments input. |
Should i improve it or you would assign duke for that? @s77rt .. we can infact use the optional params for other translations as well. thanks |
@abzokhattab I think it makes sense to assign @dukenv0307 if we will be going with his solution |
I'm not sure why we defined a custom type for every translation key. Many of them only have one parameter, it's easier to just use the parameter directly. type IncorrectZipFormatParams = {zipFormat?: string};
incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams) => ... incorrectZipFormat: (zipFormat?: string) => ... |
I believe we use objects for ease of use. In the other case you have to make sure that the passed variables are in the “correct” order .. i lean towards using objects for functions that have many arguments and use the other way in case you have few arguments |
@s77rt Sure! Proposal updated to include that as the alternate solution. |
@dukenv0307 Thank you! Let's remove 🎀 👀 🎀 C+ reviewed |
Current assignee @jasperhuangg is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-02-20. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
|
Issue is ready for payment but no BZ is assigned. @sonialiap you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks! |
@s77rt Reviewer $250 - paid ✔️ |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.26-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
"Incorrect zip code format" message should appear
Actual Result:
Incorrect error message ( privatePersonalDetails.error.incorrectZipFormat ) appear when enter Cyrillic letters into Zip/Postcode field
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: