-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: empty background when invited to private chat #58543
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
Conversation
@hungvu193 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] |
I'll review later today |
if (prevReportActions.length !== 0 || reportActions.length === 0) { | ||
return; | ||
} |
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.
If we use OR
condition here, fetchReport
will be constantly called when reportActions
changes, meanwhile we only want to fix the case when user was first invited to the room. This code looks different compared to the proposal that you proposed. Is there any reason for that?
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.
In the proposal I used direct condition, where if prevReportActions.length === 0 && reportActions.length > 0
then we call fetchReport
. In the PR, I use inverse condition to early return as it is our codebase convention.
If we use OR condition here, fetchReport will be constantly called when reportActions changes
I don't think this change creates this behavior, because we return everytime prevReportActions
have lengh. Can you check again please?
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.
Ty. I don't know why I read it as prevReportActions.length == 0
at first 😳
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-20.at.14.14.11.movAndroid: mWeb ChromeScreen.Recording.2025-03-20.at.13.33.25.mp4iOS: NativeScreen.Recording.2025-03-20.at.13.38.01.moviOS: mWeb SafariScreen.Recording.2025-03-20.at.13.25.32.movMacOS: Chrome / SafariScreen.Recording.2025-03-20.at.13.25.32.movMacOS: DesktopScreen.Recording.2025-03-20.at.14.30.10.movScreen.Recording.2025-03-20.at.13.25.32.mov |
✋ 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/techievivek in version: 9.1.17-0 🚀
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.1.17-1 🚀
|
Explanation of Change
Fixed Issues
$ #57769
PROPOSAL: #57769 (comment)
Tests
Precondition: User A and B logged in on two different devices
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
Screen.Recording.2025-03-17.at.21.28.10.mp4
Android: mWeb Chrome
Screen.Recording.2025-03-17.at.21.29.58.mp4
iOS: Native
Screen.Recording.2025-03-17.at.21.32.37.mp4
iOS: mWeb Safari
Screen.Recording.2025-03-17.at.21.37.04.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-03-17.at.10.51.13.mov
MacOS: Desktop
Screen.Recording.2025-03-17.at.21.42.18.mp4