-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[CP Staging] fix: search bar performance followup #61844
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
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 |
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.
One question for the useMemo removal - isnt that potentially going to cause worse performance?
@@ -187,7 +187,6 @@ function PolicyDistanceRatesPage({ | |||
}, []); | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should the useMemo not be used anymore?
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.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectioncanBeMissing
param foruseOnyx
toggleReport
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-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