Skip to content

[Payment due @QichenZhu] Add currencies to amount search filters - #104802

Merged
luacmartins merged 13 commits into
mainfrom
cmartins-amount-filter-currency
Nov 2, 2026
Merged

luacmartins merged 13 commits into
mainfrom
cmartins-amount-filter-currency

Conversation

@luacmartins

@luacmartins luacmartins commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Add optional comparison currencies to Amount and Purchase amount using the Create money request controls. New operands use the default expense policy's output currency, or USD, while saved currencies and currency-less operands retain their existing meaning. Qualified values use decimal major units (12.00 USD, 11.99 GBP); selecting Any currency restores bare hundredths. Any currency appears under All unless selected, when it is pinned above Recents. The filter button shortens that selection to Any. Advanced filters, quick popups, ranges, chips, and saved searches preserve the selected currency. Total/reimbursement filters and required currencies in Create money request remain unchanged.

Mobile web uses a decimal keypad with the existing Flip control. Between inputs stack on narrow layouts to keep both controls usable. The existing money-request input API is reused to preserve validation and selection behavior; converting that shared control to compound components is outside this fix.

Depends on https://github.com/Expensify/Auth/pull/25791. Deploy the backend first; older backends do not interpret the currency-qualified format correctly.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/694628

Tests

  1. Open Expenses and More filters, then add a new Amount filter. Confirm the inline currency button defaults to the default workspace currency, or USD when no default workspace exists.

  2. Enter 12.00, select USD, and apply the filter. Confirm the chip includes 12.00 USD and the Search request contains an amount operand of 12.00 USD, not 1200 USD.

  3. Reopen Amount. Confirm the input remains 12.00 and USD remains selected.

  4. Select Any currency in the currency picker and apply the filter. Confirm the filter button shows Any and the request returns to the bare operand 1200 without changing the displayed amount.

  5. Set Purchase amount to 11.99 in GBP. Confirm the request contains 11.99 GBP and the selected amount and currency survive reopening the filter.

  6. Set a Between range with lower bound 10.00 USD and upper bound 20.00 GBP. Confirm both bounds retain their own currencies when applied and reopened.

  7. Reopen the currency picker with Any currency selected and recent currencies available. Confirm Any currency is pinned above Recents and appears only once.

  8. Enter an amount, open the currency picker, and click its backdrop. Confirm only the picker closes and the filter retains its amount and currency.

  9. On mobile web, focus Amount and Purchase amount. Confirm the decimal keypad opens and Flip toggles the amount's sign without changing its currency.

  10. Open Between at a narrow width. Confirm both inputs and their Flip/currency controls remain visible without overlap, and the currency buttons have distinct Greater than and Less than accessible names.

Offline tests

  1. Disconnect the network, edit an amount filter, and select another currency. Dismiss and reopen the picker. Confirm the entered amount and selected currency remain intact.

QA Steps

  1. Repeat the Tests steps on staging. Confirm selection order, picker dismissal, signed amounts, and saved filter values match the expected results.

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Screen.Recording.2026-10-27.at.10.54.42.AM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@luacmartins
luacmartins requested a review from a team October 22, 2026 22:18
@melvin-bot
melvin-bot Bot requested a review from shawnborton October 22, 2026 22:18
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
src/components/CurrencySelectionList/index.tsx 100.00% <100.00%> (+16.39%) ⬆️
...Components/AdvancedFilters/AmountFilterContent.tsx 95.96% <100.00%> (+95.04%) ⬆️
...ents/Search/FilterComponents/AmountFilterInput.tsx 100.00% <100.00%> (ø)
.../components/Search/FilterDropdowns/AmountPopup.tsx 95.23% <100.00%> (+95.23%) ⬆️
src/hooks/useAmountFilterCurrency.ts 100.00% <100.00%> (ø)
src/libs/SearchAmountFilterUtils.ts 100.00% <100.00%> (ø)
src/libs/SearchQueryUtils.ts 91.29% <100.00%> (-0.05%) ⬇️
src/libs/SearchUIUtils.ts 76.31% <ø> (+0.57%) ⬆️
.../libs/getAmountFilterInputKeyboard/index.native.ts 100.00% <100.00%> (ø)
src/libs/getAmountFilterInputKeyboard/index.ts 100.00% <100.00%> (ø)
... and 1 more
... and 302 files with indirect coverage changes

@luacmartins

Copy link
Copy Markdown
Contributor Author

@shawnborton I could use some of your magic to improve the currency selection on the amount filter. This is the current behavior

Screen.Recording.2026-10-23.at.1.13.01.PM.mov

@shawnborton

Copy link
Copy Markdown
Contributor

cc @Expensify/design but I actually think what you have there makes sense. It's what we do for year selection in date pickers for instance:
CleanShot 2026-10-26 at 11 01 12 AM@2x

@dannymcclain

dannymcclain commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

cc @Expensify/design but I actually think what you have there makes sense.

Yeah same. Is there something specific you're wanting to improve/change?

@luacmartins

Copy link
Copy Markdown
Contributor Author

Cool, thanks for the input. Nah, it was mostly just checking if what I had made sense or if we wanted to change anything.

@trjExpensify

Copy link
Copy Markdown
Contributor

What if you want to search for an amount in any currency? 🤔

@OSBotify

This comment has been minimized.

@luacmartins

Copy link
Copy Markdown
Contributor Author

I added a Any currency menu item to allow users to search for the value in any currency. @Expensify/design how do we want to display this?
Screenshot 2026-10-26 at 1 10 24 PM

@trjExpensify

trjExpensify commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

I would probably put it atop the All sub-list. I.e

All
- Any currency [x]
- AED 
- AFN 
- etc..

When selected, just display "Cur" for the ghost button in the Amount row filter and no currency symbol:

Amount
10.00     (:coins: Cur)

@luacmartins

Copy link
Copy Markdown
Contributor Author

Cool, this is what I have now

Screen.Recording.2026-10-26.at.1.42.12.PM.mov

@shawnborton

Copy link
Copy Markdown
Contributor

Looks good to me, I wonder if we can shorten "Any currency" to just say "All" or something?

@trjExpensify

Copy link
Copy Markdown
Contributor

Looks good to me, I wonder if we can shorten "Any currency" to just say "All" or something?

WFM, just figured there was an All sub-header as well so might wanted to avoid it. I'm cool with going with All though if you guys are 👍

image

@dannymcclain

Copy link
Copy Markdown
Contributor

Maybe to avoid the double All we could call the option Any? 🤷‍♂️ No strong feelings either way to be honest

@luacmartins

Copy link
Copy Markdown
Contributor Author

I'm cool with Any of these options 😄 how do we pick the winner?

@shawnborton

Copy link
Copy Markdown
Contributor

Let's stick with Any currency but maybe in this screen here, we can shorten the button label to just say Any?
CleanShot 2026-10-27 at 10 55 16 AM@2x

@shawnborton

Copy link
Copy Markdown
Contributor

No strong feelings though. Happy to let Tom decide!

@trjExpensify

Copy link
Copy Markdown
Contributor

Works for me! 👍

@OSBotify

Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 6290e52c..7a344746 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -325,7 +325,7 @@ const translations: TranslationDeepObject<typeof en> = {
         tbd: 'Por determinar',
         selectCurrency: 'Selecciona una moneda',
         any: 'Cualquiera',
-        anyCurrency: 'Cualquier moneda',
+        anyCurrency: 'Cualquier divisa',
         selectSymbolOrCurrency: 'Selecciona un símbolo o moneda',
         card: 'Tarjeta',
         mcc: 'MCC',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index bf8b6fa4..f9c53822 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -330,8 +330,8 @@ const translations: TranslationDeepObject<typeof en> = {
         pm: 'PM',
         tbd: 'À déterminer',
         selectCurrency: 'Sélectionner une devise',
-        any: 'Toutes',
-        anyCurrency: 'N’importe quelle devise',
+        any: "N'importe lequel",
+        anyCurrency: 'N&#39;importe quelle devise',
         selectSymbolOrCurrency: 'Sélectionner un symbole ou une devise',
         card: 'Carte',
         mcc: 'MCC',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index f914e53b..32d5d494 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -331,7 +331,7 @@ const translations: TranslationDeepObject<typeof en> = {
         tbd: '未定',
         selectCurrency: '通貨を選択',
         any: 'すべて',
-        anyCurrency: 'すべての通貨',
+        anyCurrency: '任意の通貨',
         selectSymbolOrCurrency: '記号または通貨を選択',
         card: 'カード',
         mcc: 'MCC',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 589e916d..dfeb0529 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -330,7 +330,7 @@ const translations: TranslationDeepObject<typeof en> = {
         pm: 'PM',
         tbd: 'Nader te bepalen',
         selectCurrency: 'Selecteer een valuta',
-        any: 'Alle',
+        any: 'Elke',
         anyCurrency: 'Elke valuta',
         selectSymbolOrCurrency: 'Selecteer een symbool of valuta',
         card: 'Kaart',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index ec72d16f..e998536c 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -336,7 +336,7 @@ const translations: TranslationDeepObject<typeof en> = {
         pm: 'PM',
         tbd: 'Do ustalenia',
         selectCurrency: 'Wybierz walutę',
-        any: 'Dowolna',
+        any: 'Dowolny',
         anyCurrency: 'Dowolna waluta',
         selectSymbolOrCurrency: 'Wybierz symbol lub walutę',
         card: 'Karta',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 188a72d0..1cea2b19 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -331,7 +331,7 @@ const translations: TranslationDeepObject<typeof en> = {
         tbd: '待定',
         selectCurrency: '选择货币',
         any: '任意',
-        anyCurrency: '任意货币',
+        anyCurrency: '任何货币',
         selectSymbolOrCurrency: '选择符号或货币',
         card: '卡片',
         mcc: 'MCC',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

Comment on lines -53 to +63
onBackdropPress={Navigation.dismissModal}
onBackdropPress={hidePickerModal}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: in the expense creation flow, clicking the backdrop currently exits the whole flow, while with this PR it only closes the currency picker. I think the new behaviour is better, or at least no worse.

Before

staging.mov

After

pr.mov

@melvin-bot melvin-bot Bot changed the title Add currencies to amount search filters [Payment due @QichenZhu] Add currencies to amount search filters Nov 2, 2026
@melvin-bot

melvin-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

🎯 @QichenZhu, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/694628.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

JS00001
JS00001 previously approved these changes Nov 2, 2026
@luacmartins
luacmartins merged commit 02d2350 into main Nov 2, 2026
39 of 41 checks passed
@luacmartins
luacmartins deleted the cmartins-amount-filter-currency branch November 2, 2026 20:39
@OSBotify

OSBotify commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚧 luacmartins has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #105807 was identified to be related to this PR.

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker #105808 was identified to be related to this PR.

@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/luacmartins in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@OSBotify

OSBotify commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/luacmartins in version: 9.5.31-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

MelvinBot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Help site update needed: this PR adds non-beta currency comparisons to amount filters. The existing draft help site PR updates one search-operator row. It is labeled HelpDot and assigned to you.

@luacmartins, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@OSBotify

OSBotify commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #105974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.