Fix blank screen when showing the WorkspaceResetBankAccount modal#14726
Conversation
…account-reset-fix # Conflicts: # src/pages/ReimbursementAccount/ValidationStep.js
|
@rushatgabhane @ctkochan22 One of you needs to 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] |
| BankAccounts.requestResetFreePlanBankAccount(); | ||
| }} | ||
| /> | ||
| {this.props.reimbursementAccount.shouldShowResetModal && ( |
There was a problem hiding this comment.
thoughts about putting this direcly within ContinueBankAccountSetup?
| }; | ||
|
|
||
| const defaultProps = { | ||
| onConfirm: null, |
There was a problem hiding this comment.
or you can default to () => {} and then no need for if (props.onConfirm) { below
|
Updated! One thing I noticed when testing (and I'm not sure what the cause is) but if you click start over and then quickly click 1.New.Expensify.webm |
|
Ah, I think the above error is because the subStep is being overridden and set to null when resetFreePlanBankAccount completes |
|
Fixed it by adding 1.New.Expensify.1.webm |
| key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, | ||
| value: {isLoading: false}, | ||
| }, | ||
| ] |
|
@MariaHCD Bug: iOS - blank screen Steps
Screen.Recording.2023-02-04.at.2.53.39.AM.mov |
|
Thanks for testing @rushatgabhane! Let me see if I can reproduce the issue. |
|
Okay, I thought might've been due to the routing but both are the same on web and iOS: Route on web: {
"key": "ReimbursementAccount-y-7304S1Zt9qyPemSVhr_",
"name": "ReimbursementAccount",
"path": "/bank-account/",
"params": {
"stepToOpen": "BankAccountStep"
}
}Route on iOS: {
"key":"ReimbursementAccount-5pIjiTW7wxxB8i2NwmGUP",
"name":"ReimbursementAccount",
"params":{
"stepToOpen":"BankAccountStep"
},
"path":"/bank-account/"
}But for some reason, the ContinueBankAccountSetup isn't showing on iOS. Will investigate further. |
|
ohh, investigating |
ctkochan22
left a comment
There was a problem hiding this comment.
hmm strange. The view must have been a remnant when there were more components in there.
@rushatgabhane if you can test today that would be amazing!
|
Thanks, @rushatgabhane! |
|
✋ 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/MariaHCD in version: 1.2.71-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.71-1 🚀
|
| { | ||
| onyxMethod: CONST.ONYX.METHOD.MERGE, | ||
| key: ONYXKEYS.REIMBURSEMENT_ACCOUNT, | ||
| value: {isLoading: true}, |
There was a problem hiding this comment.
As a note for myself and reviewers, adding isLoading here caused this side effect: #15114


Details
Because we return the WorkspaceResentBankAccountModal here, we're inadvertently hiding the Continue with setup form leading to a blank screen. Similarly, we hide the EnableStep and ValidationStep components.
This PR ensure that the ContinueBankAccountSetup, EnableStep and ValidationStep are still visible when the WorkspaceResetBankAccount modal is shown.
Fixed Issues
$ #14692
$ #14566
PROPOSAL: NA
Tests
Bank account in setup
Start overCancelor the confirm button in the modal works as expectedVerifying bank account
No, start overand verify that the confirm modal is shown along with the ValidationStep in the backgroundCancelor the confirm button in the modal works as expectedOpen bank account
Disconnect bank accountand verify that the confirm modal is shown along with the EnableStep in the backgroundCancelor the confirm button in the modal works as expectedOffline tests
QA Steps
Same as test steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
Open.bank.account.webm
Verifying.bank.account.webm
Bank.account.in.setup.webm
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android