-
Notifications
You must be signed in to change notification settings - Fork 4k
Convert Search footer totals via GetTransactionsConvertedAmount command #94669
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
Open
c3024
wants to merge
31
commits into
Expensify:main
Choose a base branch
from
c3024:chaitanya/651977-get-transactions-converted-amount
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+889
−118
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7336dd9
Revert "Merge pull request #94562 from Expensify/revert-90777-chaitan…
c3024 e69a89b
Convert Search footer totals via GetTransactionsConvertedAmount command
c3024 30536f0
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 106e243
Trim dead and over-provisioned footer code
c3024 6f69123
Clear footer conversion cache on leaving Search
c3024 f9f45e0
Convert Search footer report selections by report
c3024 53ed7a7
Use the report path for fully-selected Reports searches
c3024 181b75d
Convert grouped-search totals in the Search footer
c3024 fe97a3d
Convert mixed group + transaction selections in the footer
c3024 4ceab90
Refetch stale footer conversions after inline edits via source stamps
c3024 767f7e2
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 f9a6032
Merge branch 'main' into chaitanya/651977-get-transactions-converted-…
c3024 0ac7f0e
Merge branch 'main' into chaitanya/651977-get-transactions-converted-…
c3024 c74d2c8
Add onFocus/onBlur support to composed Button for footer total button
c3024 41c508c
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 c852c69
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 d623a98
Bucket SEARCH_FOOTER_CONVERSION for onyx export and fix spellcheck
c3024 3545772
Send footer conversion source stamps to the command for atomic stale …
c3024 b544f43
Keep the footer on the last-known/default total when offline
c3024 20cf18a
Drop the footer loading state when a conversion request fails
c3024 5f5206c
Revert source-stamp echo; keep footer staleness App-only
c3024 cce882d
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 0c6c12d
add line break
c3024 b01e7e1
Merge remote-tracking branch 'origin/main' into chaitanya/651977-get-…
c3024 086addd
Rename footer conversion errors field to failedCurrencies
c3024 488e493
Align skeleton comment with failedCurrencies naming
c3024 af6527e
Remove unconvertible-group-selection guard and tighten skeleton comment
c3024 1e48da0
line breaks before comments
c3024 9d36d8a
Send searchKey with footer conversion requests
c3024 db800fb
Merge branch 'main' into chaitanya/651977-get-transactions-converted-…
c3024 c44fedf
Address review feedback on footer conversion requests and footer UI
c3024 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import {useCurrencyListActions, useCurrencyListState} from '@components/CurrencyListContextProvider'; | ||
|
c3024 marked this conversation as resolved.
|
||
| import type {SingleSelectItem} from '@components/Search/FilterComponents/SingleSelect'; | ||
|
|
||
| import {getCurrencyOptions} from '@libs/SearchUIUtils'; | ||
|
|
||
| import React from 'react'; | ||
|
|
||
| import SingleSelectPopup from './SingleSelectPopup'; | ||
|
|
||
| type CurrencyPopupProps = { | ||
| /** The label to show when in an overlay on mobile */ | ||
| label?: string; | ||
|
|
||
| /** Function to call when the back button is pressed */ | ||
| onBackButtonPress?: () => void; | ||
|
|
||
| /** Function to call to close the overlay */ | ||
| closeOverlay: () => void; | ||
|
|
||
| /** Function to call when a currency is selected */ | ||
| onChange: (item: SingleSelectItem<string> | undefined) => void; | ||
|
|
||
| /** The currently selected currency code */ | ||
| value?: string; | ||
|
|
||
| /** The currency code to select when reset is clicked */ | ||
| defaultValue?: string; | ||
|
|
||
| /** Search input placeholder */ | ||
| searchPlaceholder?: string; | ||
|
|
||
| /** Whether the currency list should be visible */ | ||
| shouldShowList?: boolean; | ||
| }; | ||
|
|
||
| /** | ||
| * Searchable single-select currency picker popup, used by the Search footer's total-spend currency selector. | ||
| */ | ||
| function CurrencyPopup({label, onBackButtonPress, onChange, closeOverlay, value, defaultValue, searchPlaceholder, shouldShowList}: CurrencyPopupProps) { | ||
| const {currencyList} = useCurrencyListState(); | ||
| const {getCurrencySymbol} = useCurrencyListActions(); | ||
|
|
||
| const currencyOptions = getCurrencyOptions(currencyList, getCurrencySymbol); | ||
| const currencyValue = currencyOptions.find((option) => option.value === value); | ||
|
|
||
| return ( | ||
| <SingleSelectPopup | ||
| items={currencyOptions} | ||
| value={currencyValue} | ||
| label={label} | ||
| onBackButtonPress={onBackButtonPress} | ||
| closeOverlay={closeOverlay} | ||
| onChange={onChange} | ||
| isSearchable | ||
| searchPlaceholder={searchPlaceholder} | ||
| defaultValue={defaultValue} | ||
| shouldShowList={shouldShowList} | ||
| shouldUseFixedPopoverHeight | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export default CurrencyPopup; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
src/components/Search/FilterDropdowns/GroupCurrencyPopup.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.