-
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
Update optimistic data for parent report action when completing or reopening task #22990
Conversation
@aimane-chnaif 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] |
@aimane-chnaif Friendly bump. |
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 see 4 duplicated code parts. Can we make common function for this?
yes, I thought about making common like this:
|
@aimane-chnaif I think we can refactor |
yes, let's do that |
@aimane-chnaif Updated with the common, please help to check again. |
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.
One minor change:
Co-authored-by: Aimane Chnaif <[email protected]>
Updated. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.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.
@MariaHCD 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.
One comment/suggestion but otherwise, looks good!
Co-authored-by: Maria D'Costa <[email protected]>
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.3.43-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.3.43-0 🚀
|
🚀 Deployed to staging by https://github.com/MariaHCD in version: 1.3.44-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.43-7 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.44-2 🚀
|
// Update optimistic data for parent report action if the report is a child report | ||
const optimisticParentReportData = ReportUtils.getOptimisticDataForParentReportAction(reportID, optimisticReport.lastVisibleActionCreated, CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE); | ||
if (!_.isEmpty(optimisticParentReportData)) { | ||
optimisticData.push(optimisticParentReportData); |
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.
Coming from #26012:
I won't say it's a regression but it could have been perfect if below case was handled as well:
If deleted message in thread has visible child actions,
childVisibleActionCount
ofparentReportAction
should not be decreased
}); | ||
} | ||
// Update optimistic data for parent report action if the report is a child report | ||
const optimisticParentReportData = ReportUtils.getOptimisticDataForParentReportAction(reportID, currentTime, CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD); |
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.
Coming from #38002 , we should have updated the optimistic data for each ancestor thread.
Details
Update optimistic data for parent report action when completing or reopening task
Fixed Issues
$ #20570
PROPOSAL: #20570 (comment)
Tests
Offline tests
Same as above
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screencast.from.17-07-2023.17.45.54.webm
Mobile Web - Chrome
Record_2023-07-17-17-49-24.mp4
Mobile Web - Safari
safari.mp4
Desktop
desktop.2.mp4
iOS
ios.2.mp4
Android
20570.mp4