-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: loading indicator display when deleting vague distance Expense #51940
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1fff908
fix: loading indicator display when deleting vague distance Expense
truph01 41f25da
merge main
truph01 0fab945
merge main
truph01 fcf7f3f
remove InteractionManager.runAfterInteractions
truph01 65b343b
fix: remove unused lib
truph01 10fb70b
fix: revert remove InteractionManager.runAfterInteractions
truph01 3ac6241
merge main
truph01 38b088c
merge main
truph01 d332cb7
fix: clear action first then navigate back then clear rest
truph01 12a0a68
fix: add isWeb logic
truph01 70fb37d
fix: revert unused change
truph01 173a51e
fix: lint
truph01 8353a82
fix: lint
truph01 3ecf918
merge main
truph01 a90580a
fix: move all update logic to cleanUpMoneyRequest
truph01 d71f1eb
fix: lint
truph01 4149884
fix: use promise
truph01 5117bec
fix: lint
truph01 9d570a1
fix: remove param
truph01 cc1ef7f
merge main
truph01 f104ffd
fix: remove variable and remove unused export
truph01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's not necessary to wait for all interactions to complete in this case. We can modify the behavior so that the report preview is removed immediately:
Screen.Recording.2024-11-09.at.8.48.54.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rayane-djouah I applied your fix, so the original bug is still appeared:
Screen.Recording.2024-11-11.at.11.51.05.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rayane-djouah In my opinion, in the proposed solution here, we prioritize navigation over updating Onyx data. As a result, there's a case where the user navigates successfully, but the Onyx data hasn't yet updated. This makes the behavior noted here an acceptable outcome. cc @flodnv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused -- it seems like we should optimistically set the onyx data, which ensures that it's in an expected state before we navigate, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flodnv This decision depends on our priorities, as each approach has its trade-offs:
Optimistically setting Onyx data before navigating: While this ensures the data is in the expected state before navigating, it reintroduces the bug we're currently addressing.
Navigating without waiting for Onyx data to update (current PR's approach): This approach resolves the bug but introduces a potential behavioral issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a few solutions but there is no way to both:
Each approach has its own trade-offs, as outlined here. In other parts of the NewDot app, we sometimes use the first approach and other times the second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if we want to follow the 1st approach, we just need to close this PR. What do you think @rayane-djouah
@flodnv?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@truph01 I think a potential solution would involve:
This approach assumes that the root cause of the loading indicator bug is the transaction thread data being cleared before navigation.
Could you try implementing this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rayane-djouah. I am trying your approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@truph01 Could you please share an update?