Make reason field required when closing account#85701
Conversation
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
@Krishna2323 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and push updates, run: git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-requireReasonForLeaving-v2
git checkout -b claude-requireReasonForLeaving-v2 upstream/claude-requireReasonForLeaving-v2
git push -u origin claude-requireReasonForLeaving-v2Then you can close this PR and open a new one from your fork. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_native.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #85632 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/blimpich in version: 9.3.42-0 🚀
Bundle Size Analysis (Sentry): |
|
QA team failed this PR on Native apps with an original issue, no validation error is shown in offline mode cc @blimpich @trjExpensify @Krishna2323 1774268452670.andoid.mp4 |
|
@IuliiaHerets sorry for the confusion but the offline steps in the OP is incorrect. In offline mode the error will be only shown if we focus on the input, leave it empty and then focus on the other input.
@MelvinBot please update these steps, the "Close account" button is disabled in offline mode so the validation won't happen. |
|
Updated the offline test steps in the PR description. The new steps now reflect that the "Close account" button is disabled offline, and instead test the client-side field validation by focusing on the reason field, leaving it empty, and then focusing on the email/phone field to trigger the blur validation error. |
|
@Krishna2323 @MelvinBot PR is still fail, no "This field is required" validation error in the Native app in offline mode
andoid.mp4 |
@IuliiaHerets you missed this step. |

Explanation of Change
The
validatefunction inCloseAccountPage.tsxonly listedphoneOrEmailas a required field when callinggetFieldRequiredErrors. ThereasonForLeavingfield was not included, so users could close their account without providing a reason and no validation error was shown.This adds
reasonForLeavingto the required fields array so thatgetFieldRequiredErrorswill now also check it, displaying the standard "This field is required" error when the reason field is left empty.This is a recreated version of #85682 with a clean branch (the previous PR had an orphan branch causing unrelated files to appear in the diff).
Fixed Issues
$ #85632
PROPOSAL: #85632 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari