Update search total amount footer logic#79178
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp79178_android_native.movAndroid: mWeb Chrome79178_android_web.moviOS: HybridApp79178_ios_native.moviOS: mWeb Safari79178_ios_web.movMacOS: Chrome / Safari79178_web_chrome.mov |
src/libs/SearchUIUtils.ts
Outdated
| selectedTransactionsCount: number; | ||
| }; | ||
|
|
||
| function shouldShowSearchPageFooter({isSavedSearch, resultsCount, isDefaultExpensesSearch, selectedTransactionsCount}: ShouldShowSearchPageFooterParams) { |
There was a problem hiding this comment.
I dont think this !isDefaultExpensesSearch is correct 🤔 We dont want to show the footer on any of the normal views. Expenses, reports, chats
There was a problem hiding this comment.
resultsCount is !!metadata?.count which will be not be present for reports and chats, so that's why only !isDefaultExpensesSearch was needed. What do you think?
There was a problem hiding this comment.
But wont resultsCount not be present for expenses either? On the default expense search, we shouldnt be querying metadata. (shouldCalculateTotals: true)
If we take a step back, I think we're fixing the wrong thing here. This is only updating the UI to not show the footer bar. But the problem is that, we should not be querying the footer totals from the BE at all when we are not on a suggested search or saved search. I think that we should be updating the logic for when shouldCalculateTotals: true is sent
JS00001
left a comment
There was a problem hiding this comment.
coming from my other comment:
If we take a step back, I think we're fixing the wrong thing here. This is only updating the UI to not show the footer bar. But the problem is that, we should not be querying the footer totals from the BE at all when we are not on a suggested search or saved search. I think that we should be updating the logic for when shouldCalculateTotals: true is sent
|
@ShridharGoel let us know when this is ready again! |
|
@JS00001 It's ready now |
|
After saving a "search with a selected column," the total takes a while to update, sometimes after a delay and sometimes only if I go to another tab and return to the "saved search." Screen.Recording.2026-01-13.at.15.39.01.mov@ShridharGoel and @JS00001 I don't believe that's expected, right? Thank you. |
|
@brunovjk No, it should show a loading skeleton if loading for the first time. If its already been loaded/cached then the result should be instantly |
|
Trying to find a solution for the extra time it takes the footer to update. Likely this happens because the Onyx saved search entry is added asynchronously (and often only after the API response), so for a short window |
|
@brunovjk Updated |
|
Thanks for the hard work @ShridharGoel, but we have another bug:
Screen.Recording.2026-01-19.at.09.29.57.movCan you reproduce this as well? Thank you. |
|
Tried finding a better solution few days back but couldn't do it without an extra API call. Will try to get back to this one tomorrow. |
|
@brunovjk this is ready for you again! |
brunovjk
left a comment
There was a problem hiding this comment.
Looking good
79178_web_chrome.mov
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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.3.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.17-9 🚀
|
Explanation of Change
This would prevent showing the footer when user is on the expenses tab. But we will always show the footer if it is a saved search (even when the only query is
type:expensebut there are column changes and then the user saves it).Fixed Issues
$ #78149
PROPOSAL: #78149 (comment)
Tests
Offline tests
QA Steps
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))npm run compress-svg)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
Untitled.7.mov
Android: mWeb Chrome
Screen.Recording.2026-01-09.at.12.49.54.PM.mov
iOS: Native
Screen.Recording.2026-01-09.at.12.49.08.PM.mov
iOS: mWeb Safari
Screen.Recording.2026-01-09.at.12.50.44.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-01-09.at.12.39.58.PM.mov