Closed IuliiaHerets closed 3 weeks ago
Triggered auto assignment to @garrettmknight (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Bank account - Double RHP animation when clicking on "connect bank accont"
useEffect
below double navigation is happening. currentStep
is CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT
by default.https://github.com/Expensify/App/blob/25450d96aca5d30b0fef7bdbfc9379fa71e7cd74/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L218 https://github.com/Expensify/App/blob/25450d96aca5d30b0fef7bdbfc9379fa71e7cd74/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L312-L322
We should prevent calling the navigation in the useEffect
if the backTo
route is backTo === ROUTES.WORKSPACE_WORKFLOWS.getRoute(policyID ?? '')
RHP animation gets shown twice
After we navigate to the route BANK_ACCOUNT_WITH_STEP_TO_OPEN
here, we are setting stepToOpen
to an empty string. Then, we navigate a second time with stepToOpen
set to getRouteForCurrentStep(currentStep)
in this useEffect, which causes a double RHP animation.
We should modify stepToOpen
when we call the navigateToBankAccountRoute
function, and I think it should default to ROUTE_NAMES.NEW
as we are doing here.
function navigateToBankAccountRoute(policyID: string, backTo?: string) {
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute(ROUTE_NAMES.NEW, policyID, backTo));
}
Double RHP animation when clicking on "connect bank account"
On the Workflow page, we navigate to the ReimbursementAccountPage with an empty string for stepToOpen.
Then, another navigation is triggered here because the currentStep in Onyx and the step in the route are different.
In the navigateToBankAccountRoute function, we introduced a new parameter stepToOpen
function navigateToBankAccountRoute(stepToOpen: string, policyID: string, backTo?: string) {
Navigation.navigate(ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.getRoute(stepToOpen ?? '', policyID, backTo));
}
we pass stepToOpen as ROUTE_NAMES.NEW here, we also need to update other areas that use this function.
Or even we could eliminate the navigateToBankAccountRoute function and use Navigation.navigate directly with the correct params
Job added to Upwork: https://www.upwork.com/jobs/~021837132579404847952
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External
)
@garrettmknight, @mollfpr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
The connect bank account page slide animation isn't smooth.
On the bank account page, we have a navigation code that will be called whenever the step is changed. https://github.com/Expensify/App/blob/a7a408fb0e6a01ebbe52831e468a8e3d310e4dbd/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx#L322
When we open the bank account page, the step is initially empty and will be updated to /new
which is mapped to BankAccountStep that shows whether to connect manually or with Plaid. If there is an existing progress, then the step won't be updated to /new
.
The navigation code is there to update the step params of the bank account page.
Instead of using navigate
to update the params, we can use setParams
.
Navigation.setParams({stepToOpen: getRouteForCurrentStep(currentStep)});
We should prevent calling the navigation in the useEffect if the backTo route is backTo === ROUTES.WORKSPACE_WORKFLOWS.getRoute(policyID ?? '')
@Krishna2323 The comparison doesn't make sense to me, we could have different backTo
values in the future.
We should modify stepToOpen when we call the navigateToBankAccountRoute function, and I think it should default to ROUTE_NAMES.NEW as we are doing here.
@nkdengineer When the user navigates to connect a bank account it shows the continue setup or start over, there's no step decided yet, so it makes sense to start with an empty string.
@cretadn22 It Seems your solution is similar but has a different implementation.
I think the proposal from @bernhardoj makes sense here and the double animation is not happening. We still have the correct route set up.
🎀 👀 🎀 C+ reviewed!
Triggered auto assignment to @dangrous, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Works for me!
PR is ready
cc: @mollfpr
PR is on staging
on prod 14 hours ago. Is there like a serious issue with automations right now?
EDIT: yes, but it's being fixed!
Payment Summary:
@mollfpr can you complete the checklist please?
Not overdue?
Requested in ND.
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR: [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
I couldn't determine the offending PR.
[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
The regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug. [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Confirming this is the correct payment summary:
@garrettmknight , for auditing purposes, so that we know if a contributor is paid/due and where they've been paid, can you use the below format, as per the main payment SO
Contributor: @ paid $ via Upwork Contributor+: @ due $ via NewDot
Thx
$250 approved for @mollfpr
$250 approved for @bernhardoj based on this summary.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.38-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+nl620@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
RHP animation gets shown only once
Actual Result:
RHP animation gets shown twice
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/460b2250-0e3a-436e-afff-623470302a58
View all open jobs on GitHub
Upwork Automation - Do Not Edit