[CP Staging] fix: search bar performance followup#61844
[CP Staging] fix: search bar performance followup#61844mountiny merged 6 commits intoExpensify:mainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
@thesahindia PR is ready for review. |
|
Small note – I'm going to edit the OP to remove issue 61822 because it sounds like it still needs some further improvements based on #61822 (comment) |
|
👋 It's late here and I won't be able to give this a proper review now. Please reassign for urgency. Otherwise I'd review this tomorrow. Thanks! |
|
@francoisl Please help assign @thesahindia, thanks! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApphttps://github.com/user-attachments/assets/757d31b1-da0a-4bb5-8d2f-524f7c2b3784 Screen.Recording.2025-05-13.at.11.53.04.AM.movAndroid: mWeb ChromeScreen.Recording.2025-05-13.at.11.48.29.AM.mov |
mountiny
left a comment
There was a problem hiding this comment.
One question for the useMemo removal - isnt that potentially going to cause worse performance?
| }, []); | ||
| const sortRates = useCallback((rates: RateForList[]) => rates.sort((a, b) => (a.rate ?? 0) - (b.rate ?? 0)), []); | ||
| const [inputValue, setInputValue, filteredDistanceRatesList] = useSearchResults(distanceRatesList, filterRate, sortRates); | ||
| const sections = useMemo(() => [{data: filteredDistanceRatesList, key: 'distanceRatesList'}], [filteredDistanceRatesList]); |
There was a problem hiding this comment.
Why should the useMemo not be used anymore?
There was a problem hiding this comment.
It causes an extra rerender and caused a bug that I found when implementing #61656.
|
Moving this ahead as we are quite far back with deploys |
(cherry picked from commit 9268603) (cherry-picked to staging by mountiny)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.1.44-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.44-8 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.1.45-0 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.1.45-0 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.45-21 🚀
|






Explanation of Change
Fixed Issues
$ #61820
$ #61821
$ #61833
PROPOSAL:
Also improves performance for #61822, but it still needs more improvements
Tests
Test 1:
Precondition: Workspace has at least 16 members.
Test 2:
Precondition: Workspace has imported a few per diem rates (5 per diem rates) (as long as per diem page is not scrollable).
Test 3:
Offline tests
QA Steps
Test 1:
Precondition: Workspace has at least 16 members.
Test 2:
Precondition: Workspace has imported a few per diem rates (5 per diem rates) (as long as per diem page is not scrollable).
Test 3:
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
Screen.Recording.2025-05-13.at.09.53.20.mov
Android: mWeb Chrome
Screen.Recording.2025-05-13.at.10.13.53.mov
iOS: Native
Screen.Recording.2025-05-13.at.10.16.57.mov
iOS: mWeb Safari
Screen.Recording.2025-05-13.at.10.18.38.mov
MacOS: Chrome / Safari
Screen.Recording.2025-05-13.at.10.19.11.mov
MacOS: Desktop
Screen.Recording.2025-05-13.at.10.20.07.mov