perf: Refactor sortReportsToDisplayInLHN by splitting into smaller parts#68005
Conversation
e47f51d to
197d2fd
Compare
|
@ikevin127 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-08-13.at.22.41.55.movAndroid: mWeb ChromeScreen.Recording.2025-08-13.at.20.58.05.android.chrome.moviOS: HybridAppScreen.Recording.2025-08-13.at.21.43.52.moviOS: mWeb SafariScreen.Recording.2025-08-13.at.21.05.00.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2025-08-13.at.20.33.53.web.mp4Case 2: New user Screen.Recording.2025-08-13.at.20.54.43.web.movMacOS: DesktopScreen.Recording.2025-08-13.at.20.45.03.desktop.mov |
I think this expectation should only for "regular chats" and "archived chats" |
|
@OlimpiaZurek it seems you missed recording for IOS |
added |
|
Thank you, can you also try to merge latest main into our 3 PRs? I'm unable to login with ND login in native apps |
3b97597 to
da052cb
Compare
|
Thank you for the updates. @OlimpiaZurek, please avoid force push next time please
|
JS00001
left a comment
There was a problem hiding this comment.
Changes look good, a few questions
|
✋ 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/JS00001 in version: 9.1.95-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.1.95-1 🚀
|
Explanation of Change
This PR refactors the
sortReportsToDisplayInLHNfunction by splitting it into smaller, more focused parts, replacingforEachloops withfor...offor better performance, and adding unit tests to cover its behavior.Fixed Issues
$ #67894
PROPOSAL:
Tests
* Pinned/GBR chats at the top
* Chats with errors next
* Draft chats (unsent messages)
* Regular chats
* Archived chats at the bottom
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_native_2.webm
Android: mWeb Chrome
android_mweb_2.webm
iOS: Native
iOS_native_2.mp4
iOS: mWeb Safari
iOS_mweb_2.mp4
MacOS: Chrome / Safari
web_2.mov
MacOS: Desktop
desktop_2.mov