-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix: do not reset txn if tab doesn't change #43503
Conversation
avoid txn in Onyx get reset after IOU confirmation page refresh Signed-off-by: dominictb <[email protected]>
Signed-off-by: dominictb <[email protected]>
Signed-off-by: dominictb <[email protected]>
@dominictb This fails if I refresh the page before processing to the submit expense flow Screen.Recording.2024-06-14.at.12.15.26.AM.mov |
Now I can't get this to work at all 😅 Can you please investigate it |
@s77rt well, it works for me. compressed_web.mov.mp4 |
@s77rt if you can send me the Onyx details of the transactionDraft_1:
that would be a bit help for me to investigate. Right now I'm stuck 'cause I couldn't reproduce what you just show |
After refresh this side effect will reset the money request App/src/pages/iou/request/IOURequestStartPage.tsx Lines 94 to 100 in bdb9789
Screen.Recording.2024-06-14.at.6.38.17.PM.mov |
@s77rt alright, give me some time. I'll get back to you in a short while about this. |
@s77rt below is my proposal to fix this issue. You can see the code change in the PR ProposalIssueRCAIf the transaction is created globally (via FAB for example. The full condition can be found here), the Solutions:
Result: compressed_web.mov.mp4 |
Signed-off-by: dominictb <[email protected]>
How will the side effect run if we won't re-render the screen? |
@s77rt, in that part I'm trying to explain why the first solution option didn't work (or if we can make it work, we will be exposed to high risk of regression since we have to change lots of code without knowing any side effects caused by the change). Just to be clear, it's not root cause explanation, in case you somehow think so 😄 So, if we are trying to update the We can continue this path further by checking the whether the |
@dominictb I noticed that the report id does not always change when a participant is selected. Can you investigate this and see if we can keep the same report id? (only the ones in the "Recent" section causes the change) Screen.Recording.2024-06-18.at.7.05.06.PM.mov |
@s77rt I'll get back to you on this one shortly. |
@s77rt you can see here the all items in the section There's no easy solution that directly address this. There are 2 options we can explore:
![]() |
@dominictb The current implemented solution is adding more complexity to the flow. I think we should either:
|
@s77rt alright, after checking around a bit I think I will go forward with the |
@s77rt done and test well. Please re-review, thanks! |
Bug: After selecting a participant and going back the money request is reset Screen.Recording.2024-06-20.at.4.29.10.PM.mov |
Alright, let me check this and let you know. Thanks! |
@s77rt ok I have figured out the solution:
Already updated the PR with the change. |
@dominictb Setting the transaction report id on participant selection is the right approach. Setting the report id only after refresh is a workaround. When going back can we use the transaction report id instead of the previous uri param report id? |
@s77rt after a closer look, probably going with setting To illustrate what I mean above, we are having a bug in here. Bug report
Expected: the expense should be submitted in the report that is selected in (**) bug-8MB.mp4
After reloading, the
The point here, in the So, I believe the obvious option right now is the second option #43503 (comment) here. I'll update the code and explanation shortly so you can review |
Proposed solution: In here, if the transaction is globally created from the start, we should not re-init the transaction. In each
|
FYI, yes we can, but that means after re-selecting the receipt file we'll have to go through the participant selection step. Is that behavior acceptable or we should skip the participant selection step in this case? |
Signed-off-by: dominictb <[email protected]>
Bug: Stuck at participant selection page (have to press go back multiple times) Screen.Recording.2024-06-24.at.1.01.56.PM.mov |
I'm afraid this is getting more complex than initially evaluated. Do you think we should close the PR and get back to the issue to construct a more solid proposal that covers the new found case |
@s77rt let's not close this PR. I think I'm on the right track to fix this issue. Just that I agreed that the scope has been doubled or even trippled. We should re-define the scope to see which are the buggy behaviors that we need to fix #43503 (comment) probably this is my bad when trying to enforce the fallback navigation in IOURequestStepConfirmation. We'll need to confirm the exact scope so I could proceed with the proposal. Thanks! |
@dominictb The money request should not reset on going back to the start page. All the rest behaviour should be kept as is |
@s77rt alright, give me some time. I'll update and let you know! |
Details
avoid txn in Onyx get reset after IOU confirmation page refresh
Fixed Issues
$ #40936
PROPOSAL: #40936 (comment)
Tests
Result: On refreshing scan submit expense confirmation page all details must not be disappeared
Offline tests
QA Steps
Result: On refreshing scan submit expense confirmation page all details must not be disappeared
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
compressed_android.webm.mp4
iOS: Native
iOS: mWeb Safari
compressed_simulator.mp4.mp4
MacOS: Chrome / Safari
compressed_web.mov.mp4
MacOS: Desktop