-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[CP Staging] Fix optimistic report status is not set correctly #53050
[CP Staging] Fix optimistic report status is not set correctly #53050
Conversation
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-25.at.19.48.14.android.movAndroid: mWeb ChromeScreen.Recording.2024-11-25.at.19.53.41.android.chrome.moviOS: NativeScreen.Recording.2024-11-25.at.19.56.47.ios.moviOS: mWeb SafariScreen.Recording.2024-11-25.at.20.02.33.ios.safari2.movMacOS: Chrome / SafariScreen.Recording.2024-11-25.at.19.35.23.web.movMacOS: DesktopScreen.Recording.2024-11-25.at.19.39.22.desktop.mov |
@bernhardoj I think it helps if we can link this comment #52204 (comment) in the top of PR description or PROPOSAL link |
@@ -48,6 +48,7 @@ function referTeachersUniteVolunteer(partnerUserID: string, firstName: string, l | |||
key: `${ONYXKEYS.COLLECTION.REPORT}${publicRoomReportID}`, | |||
value: { | |||
...optimisticPublicRoom, | |||
isOptimisticReport: false, |
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 am concerned about whether it works offline. Should we do the same for thread above? Set isOptimisticReport=false
on successData
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.
We can't do that. We need to trigger the openReport so we can get the existing messages on the room. Doing that means only the 2nd time we open the report will trigger the openReport.
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.
@bernhardoj can you double-check if it works offline?
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.
oh, the loading issue still happens in prod when offline so I think it's fine for DB fix PR
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.
The chat list will show when you come back online, standard behavior.
@bernhardoj could you also add recordings for other platforms? |
Done |
@@ -1550,6 +1550,7 @@ function buildOnyxDataForTrackExpense( | |||
value: { | |||
pendingFields: null, | |||
errorFields: null, | |||
isOptimisticReport: false, |
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.
@puneetlath @TMisiukiewicz Just pinging here. I think this property should be inside reportMetadata key instead. What do you'll think?
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 property isOptimisticReport
exists in the other places so no need to hold merging on this
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.
hmm yeah sounds like it could be possibly moved to reportMetadata
. Tomorrow I'll do the migration and verify if everything works properly
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.
That makes sense to me.
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.
LGTM
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!
@@ -1550,6 +1550,7 @@ function buildOnyxDataForTrackExpense( | |||
value: { | |||
pendingFields: null, | |||
errorFields: null, | |||
isOptimisticReport: false, |
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 property isOptimisticReport
exists in the other places so no need to hold merging on this
…t-set-correctly [CP Staging] Fix optimistic report status is not set correctly (cherry picked from commit 2b4ff21) (CP triggered by mountiny)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.66-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.66-8 🚀
|
Explanation of Change
#52204 (comment)
Fixed Issues
$ #53040
$ #53022
$ #52204
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Thread:
Save the world:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
web.2.mp4
MacOS: Desktop
desktop.mp4