-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Better Expense Report View] Add new navigator to allow for new SearchMoneyRequestReport screen #57607
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
Merged
luacmartins
merged 8 commits into
Expensify:main
from
software-mansion-labs:kicu/add-search-navigator
Mar 6, 2025
Merged
[Better Expense Report View] Add new navigator to allow for new SearchMoneyRequestReport screen #57607
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cea5080
Add new navigator to allow for new SearchMoneyRequestReport screen
Kicu c0bd8fe
fix small lint problems in SearchMoneyRequestReportPage
Kicu 3bfa585
Update SearchNavigator and fix handling policyID
Kicu 95ed930
Add createSearchFullscreenNavigator
WojtekBoman 9e29eb2
Add custom SearchFullscreenRouter and fix handling policyID for Search
Kicu c9555f3
Temporary disable search switching policy tests
Kicu 6240d90
Merge branch 'main' into kicu/add-search-navigator
Kicu ee451eb
Improve SEARCH_MONEY_REQUEST_REPORT route generator
Kicu 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
3 changes: 2 additions & 1 deletion
3
src/components/Navigation/TopLevelBottomTabBar/SCREENS_WITH_BOTTOM_TAB_BAR.ts
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import {SIDEBAR_TO_SPLIT} from '@libs/Navigation/linkingConfig/RELATIONS'; | ||
import NAVIGATORS from '@src/NAVIGATORS'; | ||
import SCREENS from '@src/SCREENS'; | ||
|
||
const SCREENS_WITH_BOTTOM_TAB_BAR = [...Object.keys(SIDEBAR_TO_SPLIT), SCREENS.SEARCH.ROOT, SCREENS.SETTINGS.WORKSPACES]; | ||
const SCREENS_WITH_BOTTOM_TAB_BAR = [...Object.keys(SIDEBAR_TO_SPLIT), NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR, SCREENS.SETTINGS.WORKSPACES]; | ||
|
||
export default SCREENS_WITH_BOTTOM_TAB_BAR; |
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
40 changes: 40 additions & 0 deletions
40
src/libs/Navigation/AppNavigator/Navigators/SearchFullscreenNavigator.tsx
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,40 @@ | ||
import React from 'react'; | ||
import type {SearchFullscreenNavigatorParamList} from '@libs/Navigation/types'; | ||
import * as SearchQueryUtils from '@libs/SearchQueryUtils'; | ||
import createSearchFullscreenNavigator from '@navigation/AppNavigator/createSearchFullscreenNavigator'; | ||
import FreezeWrapper from '@navigation/AppNavigator/FreezeWrapper'; | ||
import useRootNavigatorScreenOptions from '@navigation/AppNavigator/useRootNavigatorScreenOptions'; | ||
import SCREENS from '@src/SCREENS'; | ||
import type ReactComponentModule from '@src/types/utils/ReactComponentModule'; | ||
|
||
const loadSearchPage = () => require<ReactComponentModule>('@pages/Search/SearchPage').default; | ||
const loadSearchMoneyReportPage = () => require<ReactComponentModule>('@pages/Search/SearchMoneyRequestReportPage').default; | ||
|
||
const Stack = createSearchFullscreenNavigator<SearchFullscreenNavigatorParamList>(); | ||
|
||
function SearchFullscreenNavigator() { | ||
const rootNavigatorScreenOptions = useRootNavigatorScreenOptions(); | ||
|
||
return ( | ||
<FreezeWrapper> | ||
<Stack.Navigator | ||
screenOptions={rootNavigatorScreenOptions.fullScreen} | ||
defaultCentralScreen={SCREENS.SEARCH.ROOT} | ||
> | ||
<Stack.Screen | ||
name={SCREENS.SEARCH.ROOT} | ||
getComponent={loadSearchPage} | ||
initialParams={{q: SearchQueryUtils.buildSearchQueryString()}} | ||
/> | ||
<Stack.Screen | ||
name={SCREENS.SEARCH.MONEY_REQUEST_REPORT} | ||
getComponent={loadSearchMoneyReportPage} | ||
/> | ||
</Stack.Navigator> | ||
</FreezeWrapper> | ||
); | ||
} | ||
|
||
SearchFullscreenNavigator.displayName = 'SearchFullscreenNavigator'; | ||
|
||
export default SearchFullscreenNavigator; |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We removed the logic of getting the last search route and configured the query parameter for the new search page with the last query parameter from the last search page here. Then we always navigate to the search page with the default query when we click on the search page
This caused #57986