Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[HOLD for payment 2024-11-18] [$125] Expensify Card - Back button on issue card page returns to Bank account verified page #51883

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks ago

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.56-3 Reproducible in staging?: Y Reproducible in production?: N/A Unable to check 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 Email or phone of affected tester (no customers): applausetester+kh081006@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Expensify Card
  3. Click Issue new card
  4. Add a bank account
  5. Dismiss the RHP
  6. Click Issue new account
  7. Select the added bank account
  8. On Bank account verified page, click Got it
  9. On Issue card page, click RHP back button

Expected Result:

The RHP will be dismissed

Actual Result:

App returns to Bank account verified page

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/9b4080e6-1e88-4c74-825a-01b83e605de1

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @OfstadC
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021853850206557900537
  • Upwork Job ID: 1853850206557900537
  • Last Price Increase: 2024-11-05
  • Automatic offers:
    • Nodebrute | Contributor | 104755066
    • rayane-djouah | Contributor | 104792968
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @thienlnam (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 2 weeks ago

💬 A slack conversation has been started in #expensify-open-source

github-actions[bot] commented 2 weeks ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
Nodebrute commented 2 weeks ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Back button on issue card page returns to Bank account verified page

What is the root cause of that problem?

When user press Got it we simply navigate to next page rather then dismissing the current modal https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L154

What changes do you think we should make in order to solve the problem?

We should also dismiss the modal before navigating here. We can do something like this

   onPress={() => {
                                Navigation.dismissModal();
                                Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID)); 
                            }}

It's a similar approach that we also use in other places

What alternative solutions did you explore? (Optional)

We can also use goBack() before navigating to WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW

thienlnam commented 2 weeks ago

I'm not sure if this is actually a bug or not - adding external so we can get a BZ assigned to determine whether we should fix this or not

melvin-bot[bot] commented 2 weeks ago

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (External)

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @OfstadC (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.

thienlnam commented 1 week ago

Possibly no longer an issue https://expensify.slack.com/archives/C01GTK53T8Q/p1730482621189069

daledah commented 1 week ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

App returns to Bank account verified page

What is the root cause of that problem?

                                Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID), CONST.NAVIGATION.TYPE.UP); 

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 1 week ago

@OfstadC, @thienlnam, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

situchan commented 1 week ago

~@daledah's proposal~ @Nodebrute's proposal looks good. There's one more verifying step after https://github.com/Expensify/App/pull/51407 so the repro step should be updated a bit. 🎀👀🎀 C+ reviewed

melvin-bot[bot] commented 1 week ago

Current assignee @thienlnam is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Nodebrute commented 1 week ago

@situchan, I'd like to point out that we rarely use CONST.NAVIGATION.TYPE.UP in our codebase—only in two places outside of goBack. For cases like this, we generally use goBack or dismissModal, which is the more common approach throughout our app. Since goBack itself uses CONST.NAVIGATION.TYPE.UP, I don’t believe @daledah's proposal is fundamentally different from mine; it’s just another way to achieve the same result. https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/Navigation.ts#L245 https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/Navigation.ts#L235

and sometimes CONST.NAVIGATION.TYPE.UP also uses dismissModal under the hood https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/libs/Navigation/linkTo/index.ts#L122-L124

cc: @thienlnam

Nodebrute commented 1 week ago

There's one more verifying step after #51407 so the repro step should be updated a bit.

Actually, the user will either see Got it or One more step, as these are different states displayed on the same page.

https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L120 https://github.com/Expensify/App/blob/b9ec75ae4977b6df52912dae4cdab53ab7973701/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx#L141

Nodebrute commented 1 week ago

@situchan Another very similar flow in our app is the upgrade process, where after pressing Got it to open the NetSuite page, we first dismiss the modal and then navigate to the next page. https://github.com/Expensify/App/blob/4aa007bf405bd11b275bf3e599817e192fa2b249/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L52-L53

https://github.com/user-attachments/assets/cb00c3b2-a158-48b2-8d6c-b2aa1a07453e

situchan commented 1 week ago

@Nodebrute sorry I didn't realize that there was a proposal before making External. I reviewed only @daledah's proposal. And yes, your proposal also looks good. Since you're the first, you can be assigned. cc: @thienlnam

Nodebrute commented 1 week ago

@situchan Thank you so much.

OfstadC commented 1 week ago

Asking to have this retested here Based on this - https://expensify.slack.com/archives/C01GTK53T8Q/p1730487824713359?thread_ts=1730482621.189069&cid=C01GTK53T8Q

Nodebrute commented 1 week ago

As I mentioned previously, my approach is widely used across the app. For example, in this similar case #51883, this pattern was applied. I can provide many more examples if needed.

Regarding transitions, using the UP transition can be misleading for users. It creates the impression that a new screen appears on top of the previous one, but pressing the back button reveals there's no screen underneath, which can feel confusing. So, I don't believe my transition is incorrect.

daledah commented 1 week ago

As I mentioned previously, my approach is widely used across the app. For example, in this similar case https://github.com/Expensify/App/issues/51883#issuecomment-2455613641, this pattern was applied. I can provide many more examples if needed.

To effectively resolve any issue, we should focus on establishing the correct root cause analysis (RCA) and verifying that the solution addresses the current bug, rather than relying solely on whether similar solutions are used elsewhere.

Regarding transitions, using the UP transition can be misleading for users. It creates the impression that a new screen appears on top of the previous one, but pressing the back button reveals there's no screen underneath, which can feel confusing. So, I don't believe my transition is incorrect.

Let’s wait for the internal and C+ review on the correct behavior in this comment.

Nodebrute commented 1 week ago

To solve any issue properly, I think we should not depend on whether the solution is used in other places, but based on the correct RCA and verify whether it fixes the currenct bug.

Yes, I understand this is important, I’ve also verified that there are no regressions😁 As I mentioned here, I don’t believe @daledah's proposal is fundamentally different from mine; it’s simply another approach to achieve the same outcome. The behavior @daledah is mentioning can still be achieved using goBack.

Since the fix pertains to popping of screens in the same RightModalNavigator, as far as I know both goBack and UP work the same way.

As I see goBack much more commonly used in our repo than UP

Another instance where we encountered a similar issue, C+'s comment here: https://github.com/Expensify/App/issues/44506#issuecomment-2197273835

@situchan's decision:https://github.com/Expensify/App/issues/51883#issuecomment-2455557564

cc: @thienlnam

situchan commented 1 week ago

Agree with @Nodebrute.

We can also use goBack() before navigating to WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW

The same approach was used in https://github.com/Expensify/App/pull/44712

situchan commented 1 week ago

@daledah yes, I already checked it. You wanna find and fix all instances throughout the app then?

daledah commented 1 week ago

You wanna find and fix all instances throughout the app then?

I am not sure that we can cover all other cases in this issue, just want to proposal the correct approach for this issue, and then improve other places in future.

In my opinion, if we want to follow the approach we've used elsewhere, we can proceed with your selected proposal.

However, if the goal is to resolve the screen transition animation issue (where clicking 'Got it' causes the screen to swipe to the right, giving the appearance of going back), then my proposal could be a better fit.

https://github.com/user-attachments/assets/d5eda1d4-8c62-4016-a305-ac6f9fc50af5

Thanks for your feedback.

kavimuru commented 1 week ago

Bug is still reproducible

https://github.com/user-attachments/assets/4a6778b9-dcf5-4055-80fd-246f900a76a3

melvin-bot[bot] commented 1 week ago

Job added to Upwork: https://www.upwork.com/jobs/~021853850206557900537

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

melvin-bot[bot] commented 1 week ago

Upwork job price has been updated to $125

thienlnam commented 1 week ago

Adjusting bounty as this is a simple bug

melvin-bot[bot] commented 1 week ago

📣 @Nodebrute 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

thienlnam commented 1 week ago

I don't think the navigation direction makes a big difference here

Nodebrute commented 1 week ago

IOS is crashing on the latest main. The PR will be ready as soon as it gets fixed.

situchan commented 1 week ago

~@Anusha~ @Nodebrute if still same after pod install, reset cache

npm start -- --reset-cache

FYI: It's caused by https://github.com/Expensify/App/pull/48772 and fixed in https://github.com/Expensify/App/pull/52051

situchan commented 1 week ago

@s77rt please take over as C+

Nodebrute commented 1 week ago

@situchan Thank you, it worked! The PR will be ready in a few hours.

s77rt commented 1 week ago

Will get someone else to review the PR as I cannot reproduce the bug due to bank issues.

s77rt commented 1 week ago

cc @rayane-djouah

rayane-djouah commented 1 week ago

Hi! Commenting for assignment (coming from https://expensify.slack.com/archives/C02NK2DQWUX/p1730910442673039)

melvin-bot[bot] commented 1 week ago

📣 @rayane-djouah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

melvin-bot[bot] commented 4 days ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 4 days ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.59-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-18. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 4 days ago

@rayane-djouah @OfstadC The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

OfstadC commented 1 day ago

@rayane-djouah Please complete the BZ checklist before the payment date. Thank you! 😃