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.
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
Optimistic report previews #21578
Optimistic report previews #21578
Changes from 10 commits
b70230f
623b8a1
7b177a5
1685f56
62d0420
aa3a4b0
723a5d6
50ddd45
f5e4f02
279732d
769b91b
f3631c1
b4a361e
1679480
daf707f
8b4ec46
91e9371
6f88bd1
544604f
80c24b1
40a62ad
e17a359
70bff8c
7c97057
bfe57c0
1f20f9a
201f426
c379a5c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can we use ReportUtils.isSettled?
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.
This looks odd and will likely introduce a bug when you try to rollback data, since you no longer have the original created date anymore. As in my first comment, I think we should build an optimistic action only if we don't have an existing one.
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.
optimisticReportActionsData is now an array.
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.
It might be better to break this array into two objects. More readability.
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 can do this, but I'd rather do it in a separate PR. We want to get this one merged as it is part of the wave3 initiative and we want to wrap it up.
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.
But we still need to fix the lines #21578 (comment). They will cause issues.
we can not do
optimisticReportActionsData.onyxMethod = Onyx.METHOD.SET;
anymore.optimisticReportActionsData
is an array so we need to set the onyxMethod on each item in the array.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 just feel that it is a quick change and we are still working on the code. But not a blocker.
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.
yes I missed the fixes, it was also not clear what you were pointing out. Good catch though! They are now fixed.
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 think this might not be right since we are overriding the old preview action with a new one in line 389.