Add search input field to top of "Add unreported expense" screen#70280
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp70280_android_native.movAndroid: mWeb Chrome70280_android_web.moviOS: HybridAppiOS: mWeb Safari70280_ios_web.movMacOS: Chrome / Safari70280_web_chrome.movMacOS: Desktop70280_web_desktop.mov |
|
@lorretheboy, I'm noticing some strange behavior while testing the search filter. Sometimes, expenses with an empty merchant appear in the search list where they shouldn't: Screen.Recording.2025-09-10.at.20.29.16.movCan you reproduce it? Thanks. |
|
Hi @brunovjk, I didn't observe this behavior during testing. However, please give me sometime to try to reproduce and fix it |
|
@brunovjk I have updated the PR to fix that issue. It happened because we include the merchant placeholder name in case there is no merchant name. I have fixed by exclude this specific case during search |
|
Much better now @lorretheboy, I noticed a detail: the keyboard doesn't pop up when we focus on the search field: 70280_android_native.mov@mjasikowski what do you think? Thanks. |
|
Another thing @lorretheboy, could you update the steps for testing the PR? I think it would be nice to mention that the field only appears when there are 15 reports, and should not appear if there are fewer. What do you think? Thanks. |
|
Hi @mjasikowski, may I ask your thoughts on this? Personally, I would say it's fine, however, pls lemme know if you think we should focus & open the keyboard on search bar. Thanks |
|
Friendly bump @mjasikowski 😄 |
|
@lorretheboy sorry for the delay! I think it makes more sense for the keyboard to pop up when we're focused on the field |
|
Thxx for the confirm. Pls give me sometimes to check and fix this issue |
|
Hi @brunovjk, it has been fixed when I merge latest main. Could you please check again? e.movBtw: Looks like you haven't enabled keyboard here, if it still not works on your end. You may kindly enable it in settings
|
|
I think I found a bug:
Screen.Recording.2025-09-23.at.09.57.38.mov@lorretheboy do you think this bug is within the scope of our PR? Thanks. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Hi @brunovjk, thanks for waiting. I couldn't find out similar cases and it is possible to fix in our PR's scope. So I decided to fix it in this PR. Could you please re-review this again O.mov |
|
Great! Thank you very much, I'll review it as soon as possible. |
|
Sorry for the delay, @lorretheboy can you resolve the conflicts here? I'll continue with the review. Thank you. |
|
Hi team, I want to confirm here the scope of new changes:
|
|
That all sounds right to me—my questions about what was searchable were more about what's already been implemented. What does that input currently search in the list? I think it would be ideal to be able to search for merchant, amount, date, description, but if we have some scope limitations here I just want to make sure the search input accurately reflects what we're searching. |
|
@dannymcclain Currently we only search for merchant in the list. Ideally, I think it would be easier to implement if we only search for merchant and description. However, pls lemme know if you want to add other fields as well |
|
Thank you - in that case I think we either need to update the search parameters (i.e. search for more things) or let the search input reflect that it's only searching merchants. cc @Expensify/design for more thoughts |
|
It would be nice if searching on amount worked too... how hard is that? |
|
@shawnborton I will add it then, it is possible |
|
Nice! |
| pendingMatchWithCreditCardDescription: 'Recibo pendiente de adjuntar con la transacción de la tarjeta. Márcalo como efectivo para cancelar.', | ||
| markAsCash: 'Marcar como efectivo', | ||
| routePending: 'Ruta pendiente...', | ||
| findExpense: 'Buscar gasto', |
There was a problem hiding this comment.
https://expensify.slack.com/archives/C01GTK53T8Q/p1759671500657619
Confirming here...
|
Hi @brunovjk, please help review it again. Thanks |
|
It's on my list, I'll review it by the end of the day. Thank you. |
|
@lorretheboy I can search by amount, merchant, and description. However, it's not displaying very consistently I guess. I can search by description, but it seems to be showing the expense merchant. What do you think? Is this on purpose? Thanks. Screen.Recording.2025-10-07.at.21.41.24.mov |
|
Hi @brunovjk, I think it is expected since in this expense I can see that the word We have only 1 search input for all three fields so it would returns all related results
|
|
What do you think @Expensify/design? I updated the screenshots again, I still need to finish testing on iOS, my local build is having problems. |
|
I think it's looking pretty good to me.
Seems like this just feels a little off because while we search description, we don't show it. Ultimately I think that's probably fine though. Curious for how the rest of the design team feels! |
Yeah, I agree with this. Let's allow it and then maybe someday we follow up and create a more slim/"mobile" view of our expense rows that also shows description and not just merchant. |
|
Yeah I agree. I think it's still nicer than not having it searchable 👍 |
|
Great! Thank you all. I think it's all yours @mjasikowski :D |
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.2.29-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.29-5 🚀
|
| const searchableFields: string[] = []; | ||
|
|
||
| const merchant = getMerchant(transaction); | ||
| if (merchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT) { | ||
| searchableFields.push(merchant); | ||
| } | ||
|
|
||
| const description = getDescription(transaction); | ||
| if (description.trim()) { | ||
| searchableFields.push(description); | ||
| } | ||
|
|
||
| const amount = getAmount(transaction); | ||
| const currency = getCurrency(transaction); | ||
| const formattedAmount = convertToDisplayString(amount, currency); | ||
| searchableFields.push(formattedAmount); |
There was a problem hiding this comment.
We should have added a condition to normalize the amount. Not doing so caused #72803


Explanation of Change
Fixed Issues
$ #69978
PROPOSAL: #69978 (comment)
Tests
Precondition: The user has > 15 expenses in self-DM as the search bar only appears if > 15 expenses
Offline tests
QA Steps
Precondition: The user has > 15 expenses in self-DM as the search bar only appears if > 15 expenses
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-10-05.at.21.59.01.mov
ANDROID.mov
Android: mWeb Chrome
WEBSITE.ANDROID.mov
iOS: Native
Screen.Recording.2025-10-05.at.21.54.32.mov
IOS.mov
iOS: mWeb Safari
WEBSITE.IOS.mov
MacOS: Chrome / Safari
Screen.Recording.2025-10-05.at.21.50.23.mov
WEBSITE.mov
MacOS: Desktop
DESKTOp.mov