-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] IOU - Amount page reloaded when navigate back from final confirmation and click next btn #30060
Comments
Triggered auto assignment to @peterdbarkerUK ( |
Job added to Upwork: https://www.upwork.com/jobs/~014945c77a33a9f852 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When using the IOU manual request flow, attempting to go back to the requestMoneyAmount page and then moving forward again breaks the flow and resets the request What is the root cause of that problem?Once you reach the confirmation page, the route of the app changes from /request to /split
Because the ID of a request is generated from the route, the safety measure preventing two separate IOUs on different tabs from interfering with each other is triggered, due to the conflict between IDs. This causes the request to be reset. What changes do you think we should make in order to solve the problem?Currently, hitting the back button in this flow triggers a typical back action. We can maintain the ID properly by enforcing a fallback route rather than allowing the browser to determine which route to navigate back to. The navigateBack function for the confirmation page before (note that the Navigation.goBack() function provides a fallback, but doesn't supply the optional second parameter to enforce navigation to the fallback):
The navigateBack function after (note the optional second parameter enforcing the fallback route in the Navigation.goBack call:
I've tested this on my local machine, and it fixes the problem perfectly. I can't think of any edge cases which could cause this not to work, as no other pages navigate directly to the end of the manual request flow. We could also conditionally enforce the fallback route when the iouType is not "request", and it would work the same but maintain the current approach when it makes sense.
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Amount page reloaded when navigate back from final confirmation and click next btn What is the root cause of that problem?After we choose the split, we navigate back with
What changes do you think we should make in order to solve the problem?We should call goBack function with the
App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js Line 117 in 69cf29e
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Amount page re-navigating to itself when user comes back from confirmation page of a split request What is the root cause of that problem?The root cause of the problem is when a user split the iou by pressing split button on a user on participants page and navigates to the confirmation page Lines 2899 to 2907 in 5d45f0f
Then the page will navigate to participants page but immediately this effect on the code below will make it to navigate back to amount page because iou is reset and App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js Lines 103 to 105 in 5d45f0f
What changes do you think we should make in order to solve the problem?The perfect solution is to revert back the application state when the user navigates back to participants from confirmation page so that there will be no confusion and unexpected behaviour of the application. I choose this approach because it will allow us to leave other working features of the existing code to be intact and fix this specific issue. When the user select the split participant and presses the
Then we should change this code App/src/pages/iou/steps/MoneyRequestConfirmPage.js Lines 113 to 122 in 5d45f0f
to
so that POC: 2023-11-01.13-13-17.mp4What alternative solutions did you explore? (Optional) |
I wouldn't say this solution for #29972 actually solves this issue. It would stop the request amount from being reset but the rest of the stored information (participants, description, etc.) would be reset upon navigating back to the start of the user flow. Since the route in this case is supposed to act as the source of truth for the state of the app, it makes more sense to reflect the state of the app accurately in the route. |
We can also reset only Lines 2863 to 2871 in eb5fec2
But my logic is this function is called after amount is already input by the user (whether from manual, distance, ...) so resetting iou.amount because there is a mismatch b/n iouType and iou.id is not logical and that's why the app re-navigates to the amount page.
|
@peterdbarkerUK, @jjcoffee Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@peterdbarkerUK, @jjcoffee Huh... This is 4 days overdue. Who can take care of this? |
Ollyws confirmed this is separate! @jjcoffee could you review the proposals? |
@peterdbarkerUK @jjcoffee please check my updated proposal |
Reviewing tomorrow! |
@graylewis's proposal LGTM! The RCA is correct and the solution seems appropriate. Just a side note though, it's much easier to review your proposal if you provide links to the parts of code you're talking about (see @dukenv0307's proposal for inspiration!). 🎀👀🎀 C+ reviewed |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @graylewis 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Assigned to @graylewis, with an extra point towards the proposal feedback here, and the additional consideration to account for here. |
Actually we might need to put this one on hold for #28618 as this would be fixed there. I'm unsure how quickly that will be rolled out though, so depends on whether or not we want a fix in the meantime. cc @peterdbarkerUK |
@jjcoffee @peterdbarkerUK I'm a little confused. I'm already hired on upwork to handle the fix. Should I just go ahead and fix it or should I hold off? |
Let's wait on @peterdbarkerUK's response for now. Sorry for the confusion! |
@graylewis @peterdbarkerUK @jjcoffee @roryabraham this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
@graylewis @peterdbarkerUK @jjcoffee @roryabraham this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks! |
@graylewis I'm sorry for the confusion! Let's put this on hold for #28618! |
Still on HOLD |
Still on HOLD |
Looks like this can come off HOLD |
No longer reproducible. Let's close this @peterdbarkerUK or @roryabraham |
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: 1.3.87-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:
Precondition: user should be signed in
Expected Result:
User should be navigated on the select attendees page
Actual Result:
The same page reloaded with default amount (the default amount is zero)
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Recording.1775.mp4
MacOS: Desktop
Bug6243732_1697763904692.Recording__419.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: