-
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
[$250] Contact method - Two error messages appear the same time #55490
Comments
Triggered auto assignment to @zanyrenney ( |
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-21 05:01:01 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Contact method - Two error messages appear the same time What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
const validateAndSubmitForm = useCallback(() => {
User.clearValidateCodeActionError('actionVerified');
if (!validateCode.trim()) {
setFormError({validateCode: 'validateCodeForm.error.pleaseFillMagicCode'});
return;
}
if (!ValidationUtils.isValidValidateCode(validateCode)) {
setFormError({validateCode: 'validateCodeForm.error.incorrectMagicCode'});
return;
}
setFormError({});
handleSubmitForm(validateCode);
}, [validateCode, handleSubmitForm]); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Two error messages appears at the same time What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?To remove the previous error, we can clear the Line 416 in bec182c
in the failureData we can add this: {
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.VALIDATE_ACTION_CODE,
value: {
errorFields: {
actionVerified: null,
},
},
}, What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)NA Screen.Recording.2025-01-21.at.9.15.23.AM.mov |
PROPOSAL UPDATED
|
Job added to Upwork: https://www.upwork.com/jobs/~021882050166066042062 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
hey @parasharrajat - please review the proposals above and let me know which looks good! |
🚨 Edited by proposal-police: This proposal was edited at 2025-01-23 21:25:51 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Contact method - Two error messages appear the same time What is the root cause of that problem?We already have a pattern to clear errors on text input here App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 187 to 191 in fc199fa
but we are only clearing both errors when the validateError is not empty so it will not clear the validateCodeActionError when validateError doesn't exist
What changes do you think we should make in order to solve the problem?We need to clear App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx Lines 187 to 191 in fc199fa
Additionally we can also consider clearing both errors on validateAndSubmitForm here. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional) |
I will start looking into the proposals today. |
Following the same pattern on clearing the error text input makes sense. I think that there was a case on why we are removing both errors together on text input change. Thus @Krishna2323's proposal looks good to me and they proposed first. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@parasharrajat PR is ready for review. |
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: 9.0.86-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The previous error must disappear when the next one appears
Actual Result:
Two error messages appear at the same time
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6704213_1736242730055.bandicam_2025-01-07_15-04-37-042.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @parasharrajatThe text was updated successfully, but these errors were encountered: