perf: Move remaining useOnyx calls up in the Search component tree#65648
Conversation
f54ad4e to
2da42e1
Compare
|
Expenses: === 📁 Trace File Analysis === 📄 File: opening_expenses_before.json 📄 File: opening_expenses_after.json === 📊 Trace Comparison === 🔁 Comparing Baseline |
|
Chats: === 📁 Trace File Analysis === 📄 File: opening_chats_before.json 📄 File: opening_chats_after.json === 📊 Trace Comparison === 🔁 Comparing Baseline |
|
Reports: === 📁 Trace File Analysis === 📄 File: opening_reports_before.json 📄 File: opening_reports_after.json === 📊 Trace Comparison === 🔁 Comparing Baseline |
|
Search: === 📁 Trace File Analysis === 📄 File: opening_search_before.json 📄 File: opening_search_after.json === 📊 Trace Comparison === 🔁 Comparing Baseline |
|
@OlimpiaZurek Plz resolve conflicts. Also tagging @hoangzinh for the second review. |
04d651a to
5241f77
Compare
5241f77 to
78b34db
Compare
78b34db to
2d83b00
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandd1.webmAndroid: mWeb Chromeandd2.webmiOS: HybridAppSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-07-13.at.18.46.38.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-07-13.at.18.45.32.mp4MacOS: Chrome / SafariScreen.Recording.2025-07-13.at.18.26.40.movMacOS: Desktop |
| const taxRates = useMemo(() => getAllTaxRates(), []); | ||
| const [userCardList] = useOnyx(ONYXKEYS.CARD_LIST, {canBeMissing: true}); | ||
| const [workspaceCardFeeds] = useOnyx(ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST, {canBeMissing: true}); | ||
| const [workspaceCardFeeds = getEmptyObject<Record<string, WorkspaceCardsList | undefined>>()] = useOnyx(ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST, {canBeMissing: true}); |
There was a problem hiding this comment.
Do we really need this assignment here and other places?
There was a problem hiding this comment.
You're right, it's not needed here and adds unnecessary complexity. Already changed.
| reports: OnyxCollection<Report>; | ||
|
|
||
| /** All feeds */ | ||
| allFeeds: Record<string, CardFeeds | undefined>; |
There was a problem hiding this comment.
| allFeeds: Record<string, CardFeeds | undefined>; | |
| allFeeds: Record<string, CardFeeds | undefined> | undefined; |
| personalDetails={personalDetails} | ||
| reports={reports} | ||
| allCards={allCards} | ||
| allFeeds={allFeeds ?? {}} |
There was a problem hiding this comment.
| allFeeds={allFeeds ?? {}} | |
| allFeeds={allFeeds} |
src/components/Search/SearchPageHeader/SearchPageHeaderInput.tsx
Outdated
Show resolved
Hide resolved
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.1.81-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.1.81-7 🚀
|
Explanation of Change
This PR moves the remaining useOnyx subscriptions up in the Search component tree
Fixed Issues
$ #63631
PROPOSAL:
Tests
Reportsby tapping the bottom tabOffline 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.webm
Android: mWeb Chrome
android_mweb.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.-.2025-07-09.at.17.18.49.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
Screen.Recording.2025-07-09.at.17.21.22.mov