-
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 VBBA refactor] [$500] Web – Add bank account modal is displayed briefly with 2 options if bank account has been added #34919
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0182f628dafbfb1237 |
Triggered auto assignment to @adelekennedy ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.For some time, we see the bank account modal with 2 options even when the bank was added What is the root cause of that problem?In
Until we update the value of currentStep, we see the default option to select the 2 options to add bank account modal. when the currentStep will be set to App/src/pages/ReimbursementAccount/ReimbursementAccountPage.js Lines 533 to 539 in f3111a4
What changes do you think we should make in order to solve the problem?Simply remove the default assignment to What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
This has the same root cause as #31030, so taking my proposal from there. ProposalPlease re-state the problem that we are trying to solve in this issue.The bank account page shows the connect option page instead of the all set page. What is the root cause of that problem?It's a regression from #29260 where we always clear the bank account data when we close the bank account page. App/src/pages/ReimbursementAccount/ReimbursementAccountPage.js Lines 278 to 287 in 616d75f
So, when we reopen the bank account page, the page doesn't know we have a finished setup and shows the connect option page. The purpose of that PR is to solve #27901 (blinking issue). The issue is that when we open the BA page, it will first show the connect option page, a full-screen loader, and then the connect option page. However, the PR itself is full of flaws. First, we lost our ongoing BA setup whenever we closed the page. Second, the second condition below always returns false.
Why? Undercore What changes do you think we should make in order to solve the problem?Undo the changes from #29260 and then we should have a new fix for the blinking issue #27901. To fix the blinking issue, we should understand the root cause first which is explained in the blinking issue proposal. To put it short, we set the loading state of the BA onyx on mount, App/src/pages/ReimbursementAccount/ReimbursementAccountPage.js Lines 278 to 280 in 616d75f
App/src/pages/ReimbursementAccount/ReimbursementAccountPage.js Lines 266 to 268 in 616d75f
but it takes time, so we initially see the connect option page. After the onyx sends us the new data, a full-screen loading is shown, and after the loading is done, we see the connect option again.
From what I understand, we want to immediately show the loading indicator on the component mount. To achieve this, we should have a loading state/props that has an initial value of The first one is to have a new reimbursement account onyx connection with an undefined initial value and only takes the isReimbursementAccountLoading: {
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
initWithStoredValues: false,
selector: (reimbursementAccount) => lodashGet(reimbursementAccount, 'isLoading'),
}, We set However, What alternative solutions did you explore? (Optional)The second one is to have a new local state called We will update const prevIsReimbursementAccountLoading = usePrevious(reimbursementAccount.isLoading);
useEffect(() => {
if (reimbursementAccount.isLoading === prevIsReimbursementAccountLoading) return
setIsLoading(reimbursementAccount.isLoading);
}, [prevIsReimbursementAccountLoading, reimbursementAccount.isLoading]); Another alternative: Below is the solution if((!hasACHDataBeenLoaded && isLoading) Currently, we show the loading indicator if it's loading OR we don't have the data yet.
Onyx fixThe root cause of the broken To fix it, we should initialize the onyx key only if -if (
+if (mapping.initWithStoredValues &&
((value !== undefined
&& !Onyx.hasPendingMergeForKey(key))
|| mapping.allowStaleData)
) { Btw, I guess we want to wait for bank account refactor @mountiny |
@Santhosh-Sellavel a few proposals to review! |
On hold |
Thanks for clearing that up! |
I'm unavailable next week, Please assign a new C+ Issue here if required while I am away, thanks! cc: @adelekennedy |
Hey @Santhosh-Sellavel do you think GH issue will be resolved with this job? (can we consolidate #36376 into this one?) Other option is to put #36376 on hold until this is fixed to see if it resolves the issue. |
@Christinadobrzyn Lets put that on hold too. |
still on hold |
I think we can unhold this? |
Coming from #39319 which has the same root cause. ProposalPlease re-state the problem that we are trying to solve in this issue.Add bank account modal is displayed briefly with 2 options if bank account has been added. Then directed to a page with the header Connect bank account and the option to disconnect your bank account What is the root cause of that problem?This PR #29260 leads to the reimbursement account being cleared whenever What changes do you think we should make in order to solve the problem?
We should not clear the reimbursement account fully, we can just clear the Plaid data that is generated when we attempt the connection. This will make sure that the Without this step, there won't be any loading indicator when coming to the
We can set a local
Then in here, use What alternative solutions did you explore? (Optional)In addition to the 1st solution part, we can potentially revert the whole offending PR. An alternative to step 2 is to still use Moreover in |
I actually think we should close this one given our new standards - this is a bug but isn't very disruptive |
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.29-1
Reproducible in staging?: Y
Reproducible in production?: Y
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:
Directed to a page with the header Connect bank account and the option to disconnect your bank account
Actual Result:
Add bank account modal is displayed briefly with 2 options if bank account has been added. Then directed to a page with the header Connect bank account and the option to disconnect your bank account
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6350916_1705949472773.Add_bank_account_modal.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: