-
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 - Web - Search - New messages are not updated automatically in chats section #53482
Fix - Web - Search - New messages are not updated automatically in chats section #53482
Conversation
@mananjadhav 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] |
Reviewing. |
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.
Minor comments and questions
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-new-messages.movAndroid: mWeb Chromemweb-chrome-new-messages.moviOS: NativeiOS: mWeb Safarimweb-safari-new-messages.movMacOS: Chrome / Safariweb-new-messages.movMacOS: Desktopdesktop-new-messages.mov |
I have some issues with my pod install. The change is tested in all the other platforms. Approving this. Will try to upload the iOS screenshot later. |
useEffect(() => { | ||
const previousTransactionsLength = previousTransactions && Object.keys(previousTransactions).length; | ||
const transactionsLength = transactions && Object.keys(transactions).length; | ||
|
||
// Return early if search was already triggered or there's no change in transactions length | ||
if (searchTriggeredRef.current || previousTransactionsLength === transactionsLength) { | ||
const reportActionsLength = reportActions && Object.values(reportActions).reduce((sum, curr) => sum + Object.keys(curr ?? {}).length, 0); |
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 this can be changed to this, no?
const reportActionsLength = reportActions && Object.values(reportActions).reduce((sum, curr) => sum + Object.keys(curr ?? {}).length, 0); | |
const reportActionsLength = reportActions && Object.values(reportActions).length; |
And also below
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.
Nope @marcochavezf the structure of reportActions is
{
reportAction_reportID:{
reportActionID:{},
reportActionID2:{}
...
}
}
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.
Oh cool, thanks for the clarification!
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, thanks guys!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.0.76-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.76-12 🚀
|
Details
Fixed Issues
$ #52193
PROPOSAL: #52193 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
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)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
a.highlight.mp4
Android: mWeb Chrome
aw.mp4
iOS: Native
i.mp4
iOS: mWeb Safari
iw.mp4
MacOS: Chrome / Safari
w.mp4
MacOS: Desktop
d.mp4