-
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: hide pending deleted actions #32474
Conversation
@s-alves10 A similar issue happens when removing a message in offline mode and then going online; the difference is that the green marker never disappears. Please fix that, thanks! Details in the video below: Nagranie.z.ekranu.2023-12-6.o.11.28.35.mov |
The root cause of the issue mentioned in #32474 (comment) is that report actions are not filtered again when network offline status changes. I updated the solution and the PR description(test steps, videos) |
@s-alves10 I'm having some desktop build & run issues. Please update with the latest main |
I merged the PR with the latest main. Please check |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromeandroid.chrome.moviOS: Nativeios.moviOS: mWeb Safariios.safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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.
All works! Thanks for PR
src/pages/home/ReportScreen.js
Outdated
@@ -168,8 +170,11 @@ function ReportScreen({ | |||
const {addWorkspaceRoomOrChatPendingAction, addWorkspaceRoomOrChatErrors} = ReportUtils.getReportOfflinePendingActionAndErrors(report); | |||
const screenWrapperStyle = [styles.appContent, styles.flex1, {marginTop: viewportOffsetTop}]; | |||
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps -- need to re-filter the report actions when network status changes | |||
const filteredReportActions = useMemo(() => _.filter(reportActions, (action) => ReportActionsUtils.shouldReportActionBeVisible(action)), [isOffline, reportActions]); |
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 iterating over report actions is going to be responsible for performance?
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.
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.
Will you check again @MonilBhavsar ?
Looks good! @ArekChr if you could also please take a look |
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, retested and all works
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!
✋ 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/MonilBhavsar in version: 1.4.13-0 🚀
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.4.13-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.13-8 🚀
|
Details
Hide the delete pending actions
Fixed Issues
$ #31637
PROPOSAL: #30485 (comment)
Tests
Offline tests
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(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
Android: Native
31637_android_native.mp4
Android: mWeb Chrome
31637_android_chrome.mp4
iOS: Native
31637_ios_native.mp4
iOS: mWeb Safari
31637_ios_safari.mp4
MacOS: Chrome / Safari
31637_mac_chrome.mp4
MacOS: Desktop
31637_mac_desktop.mp4