-
Notifications
You must be signed in to change notification settings - Fork 4k
Mobile search-router is a RHP on native #77380
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
mountiny
merged 15 commits into
Expensify:main
from
software-mansion-labs:feat/migrate-search-router-to-navigation
Jan 12, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c7307b8
POC: Mobile search-router is a RHP
jmusial ca53cc6
refactor
jmusial 0a213e7
update navigator
jmusial d59150a
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial c96faaf
prettier
jmusial 2264277
fix typecheck
jmusial bfca1b4
fix code style
jmusial ccb2f0a
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial be1c751
make sure search router address cannot be navigated to manually
jmusial f2d1c7c
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial 090b724
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial f5839e7
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial cda1421
Merge branch 'main' into feat/migrate-search-router-to-navigation
jmusial ff3d440
remove redundant displayName"
jmusial b2a16ac
move files to folders and change screen key
jmusial 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
8 changes: 8 additions & 0 deletions
8
src/components/Search/SearchRouter/SearchRouterModal/index.native.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,8 @@ | ||
| /** | ||
| * On native devices SearchRouter is served from SearchRouterPage, on web from SearchRouterModal. | ||
| */ | ||
| function SearchRouterModal() { | ||
| return null; | ||
| } | ||
|
|
||
| export default SearchRouterModal; |
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
28 changes: 28 additions & 0 deletions
28
src/components/Search/SearchRouter/SearchRouterPage/index.native.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,28 @@ | ||
| import React from 'react'; | ||
| import ScreenWrapper from '@components/ScreenWrapper'; | ||
| import SearchRouter from '@components/Search/SearchRouter/SearchRouter'; | ||
| import {useSearchRouterContext} from '@components/Search/SearchRouter/SearchRouterContext'; | ||
|
|
||
| function SearchRouterPage() { | ||
| const {isSearchRouterDisplayed, closeSearchRouter} = useSearchRouterContext(); | ||
|
|
||
| return ( | ||
| <ScreenWrapper | ||
| testID="SearchRouterPage" | ||
| shouldEnableMaxHeight | ||
| enableEdgeToEdgeBottomSafeAreaPadding | ||
| includePaddingTop | ||
| includeSafeAreaPaddingBottom | ||
| > | ||
| <SearchRouter | ||
| onRouterClose={closeSearchRouter} | ||
| shouldHideInputCaret={false} | ||
| isSearchRouterDisplayed={isSearchRouterDisplayed} | ||
| /> | ||
| </ScreenWrapper> | ||
| ); | ||
| } | ||
|
|
||
| SearchRouterPage.displayName = 'SearchRouterPage'; | ||
|
|
||
| export default SearchRouterPage; |
11 changes: 11 additions & 0 deletions
11
src/components/Search/SearchRouter/SearchRouterPage/index.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,11 @@ | ||
| import Navigation from '@libs/Navigation/Navigation'; | ||
| import ROUTES from '@src/ROUTES'; | ||
|
|
||
| /** | ||
| * On native devices SearchRouter is served from SearchRouterPage, on web from SearchRouterModal. | ||
| */ | ||
| function SearchRouterPage() { | ||
| return Navigation.navigate(ROUTES.HOME); | ||
| } | ||
|
|
||
| export default SearchRouterPage; |
12 changes: 12 additions & 0 deletions
12
src/components/Search/SearchRouter/toggleSearch/index.native.tsx
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can use |
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,12 @@ | ||
| import Navigation from '@libs/Navigation/Navigation'; | ||
| import ROUTES from '@src/ROUTES'; | ||
|
|
||
| function openSearch() { | ||
| return Navigation.navigate(ROUTES.SEARCH_ROUTER); | ||
| } | ||
|
|
||
| function closeSearch() { | ||
| return Navigation.dismissModal(); | ||
| } | ||
|
|
||
| export {openSearch, closeSearch}; |
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,9 @@ | ||
| function openSearch(setSearchState: React.Dispatch<React.SetStateAction<boolean>>) { | ||
| return setSearchState(true); | ||
| } | ||
|
|
||
| function closeSearch(setSearchState: React.Dispatch<React.SetStateAction<boolean>>) { | ||
| return setSearchState(false); | ||
| } | ||
|
|
||
| export {openSearch, closeSearch}; |
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
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.
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.
this one too. the file path needs to be changed as well.