-
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
Fix a fail to add and edit/delete message doesn't get cleared when closing the error message #33198
Fix a fail to add and edit/delete message doesn't get cleared when closing the error message #33198
Conversation
@eVoloshchak 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] |
@@ -183,7 +183,7 @@ function createTaskAndNavigate(parentReportID, title, description, assigneeEmail | |||
successData.push({ | |||
onyxMethod: Onyx.METHOD.MERGE, | |||
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, | |||
value: {[optimisticAddCommentReport.reportAction.reportActionID]: {pendingAction: null}}, | |||
value: {[optimisticAddCommentReport.reportAction.reportActionID]: {pendingAction: null, isOptimisticAction: null}}, | |||
}); |
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 added the isOptimisticAction
in buildOptimisticAddCommentReportAction
. buildOptimisticAddCommentReportAction
is also used to build the task optimistic message, so we need to clear it for task action too.
@@ -13,7 +13,7 @@ function clearReportActionErrors(reportID: string, reportAction: ReportAction) { | |||
return; | |||
} | |||
|
|||
if (reportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) { | |||
if (reportAction.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD || reportAction.isOptimisticAction) { |
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 still need to check the specific pendingAction
for other types of report action (iou, submitted expense, etc.).
Added iOS Safari recording |
@eVoloshchak please review when you got the chance |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-01-08.at.17.09.50.movAndroid: mWeb ChromeScreen.Recording.2024-01-08.at.17.20.54.moviOS: NativeScreen.Recording.2024-01-08.at.17.24.32.moviOS: mWeb SafariScreen.Recording.2024-01-08.at.17.26.36.movMacOS: Chrome / SafariScreen.Recording.2024-01-08.at.17.07.06.movMacOS: DesktopScreen.Recording.2024-01-08.at.17.29.26.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.
@bernhardoj, the code looks good and tests well
Could you resolve the conflicts so I could test this once again with latest changes from main?
P.S. Apologies for the delay, was OOO
@eVoloshchak conflicts solved |
@eVoloshchak please review when you got the chance 🙇 |
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!
@bernhardoj, looks like the author checklist has had recent changes made to it, could you look into this please? |
✋ 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/marcaaron in version: 1.4.23-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.23-4 🚀
|
Details
When we do multiple actions on a message while offline, the previous pending action is overwritten, and if one of them fails, the pending action is cleared.
Fixed Issues
$ #32529
PROPOSAL: #32529 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
Screen.Recording.2023-12-16.at.14.23.17.mov
Android: mWeb Chrome
Screen.Recording.2023-12-16.at.14.16.48.mov
iOS: Native
Screen.Recording.2023-12-16.at.14.19.16.mov
iOS: mWeb Safari
Screen.Recording.2023-12-18.at.19.33.11.mov
MacOS: Chrome / Safari
Screen.Recording.2023-12-16.at.14.04.01.mov
MacOS: Desktop
Screen.Recording.2023-12-16.at.14.05.48.mov