-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Room - Infinite loading when user is removed from room while in RHP #59126
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
Room - Infinite loading when user is removed from room while in RHP #59126
Conversation
@allroundexperts 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] |
@allroundexperts what is your eta? thanks! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2025-04-03.at.12.20.04.PM.moviOS: NativeScreen.Recording.2025-04-03.at.12.19.08.PM.moviOS: mWeb SafariScreen.Recording.2025-04-03.at.12.17.52.PM.movMacOS: Chrome / SafariScreen.Recording.2025-04-03.at.12.12.58.PM.movMacOS: DesktopScreen.Recording.2025-04-03.at.12.15.32.PM.mov |
I am unable to test this on Android because pusher notification is not coming along. Screen.Recording.2025-04-03.at.12.23.21.PM.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.
Looks good. I posted the issue for Android, but that is becayse of pusher notifications not being received.
src/pages/home/ReportScreen.tsx
Outdated
const currentRoute = navigationRef.getCurrentRoute(); | ||
const isReportDetailOpenInRHP = | ||
isTopMostReportId && | ||
[...Object.values(SCREENS.REPORT_DETAILS), ...Object.values(SCREENS.REPORT_SETTINGS), ...Object.values(SCREENS.PRIVATE_NOTES)].find((r) => r === currentRoute?.name) && |
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.
Could you move this [...Object.values(SCREENS.REPORT_DETAILS), ...Object.values(SCREENS.REPORT_SETTINGS), ...Object.values(SCREENS.PRIVATE_NOTES)]
out of scope of the method so its not computed every time? I think this can be done just once
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.
@mountiny Good catch, i updated. Please help to check again.
src/pages/home/ReportScreen.tsx
Outdated
@@ -526,6 +526,7 @@ function ReportScreen({route, navigation}: ReportScreenProps) { | |||
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps | |||
}, [prevIsFocused, report?.participants, isFocused, isSingleTransactionView, reportID]); | |||
|
|||
const reportDetailScreens = [...Object.values(SCREENS.REPORT_DETAILS), ...Object.values(SCREENS.REPORT_SETTINGS), ...Object.values(SCREENS.PRIVATE_NOTES)]; |
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.
Could this be moved even out of the ReportScreen function? cc @allroundexperts
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 Screens wont really ever change in the render cycle so we could move it out of the component completely
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.
@mountiny I updated
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/mountiny in version: 9.1.25-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.25-4 🚀
|
Explanation of Change
Fixed Issues
$#58235
PROPOSAL:#58235 (comment)
Tests
Offline tests
QA Steps
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_native.mp4
Android: mWeb Chrome
android_chorme.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
chorme.mp4
MacOS: Desktop
desktop.mp4