-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Search v1] Implement Search navigation logic #40280
Merged
luacmartins
merged 30 commits into
Expensify:main
from
software-mansion-labs:search-v1/nav-logic
Apr 18, 2024
+274
−77
Merged
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
c96e516
migrate search page to find page v1
adamgrzybowski 1e5150b
add new search tab
adamgrzybowski eef26cc
Add search page template components
WojtekBoman 3c74507
Add new search pages
WojtekBoman a707c28
remove native.tsx for createCustomStackNavigator
adamgrzybowski 3afd0b9
add check for search page in getAdaptedStateFromPath
adamgrzybowski 2206c1d
Handle passing params to useActiveRoute
WojtekBoman e7de7ea
Merge branch 'new-search-tab' into new-search-tab-poc
WojtekBoman b9d88d9
Merge pull request #85 from software-mansion-labs/new-search-tab-poc
WojtekBoman a1b228a
Adjust getAdaptedStateFromPath to new search routes
WojtekBoman a72d221
fix linnkTo
adamgrzybowski 633d881
remove waitForNavigation and OnyxTabNavigator from SearchPageBottomTab
adamgrzybowski 2d78c11
remove waitForNavigation and OnyxTabNavigator from SearchPageBottomTa…
adamgrzybowski b57d456
add customBackHandler
adamgrzybowski 2fcae18
remove unused imports
adamgrzybowski 18ed94f
Merge branch 'main' into new-search-tab
WojtekBoman 1de5ce3
Add a tooltip for the search icon in the bottom tab
WojtekBoman f84911b
Add SEARCH_QUERIES consts, hide new features
WojtekBoman 8ea25e3
Remove SEARCH_QUERIES const
WojtekBoman 5ea4a9f
Remove test page
WojtekBoman 2e38d66
add comment for useCustomBackHandler
adamgrzybowski f724761
Exclude shallowCompare function
WojtekBoman f28c388
Merge branch 'main' into search-v1/nav-logic
WojtekBoman 1b33065
Remove redundant const
WojtekBoman 39a308a
Remove test code from TabSelector
WojtekBoman 0c538bb
Refactor createCustomStackNavigator
WojtekBoman 3cb9dbe
Refactor search pages
WojtekBoman faf9a69
Remove unused code
WojtekBoman 87a4076
Remove unused code
WojtekBoman 3b7a83d
Handle displaying FAB on the new search page
WojtekBoman 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 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 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 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 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 |
---|---|---|
|
@@ -33,6 +33,16 @@ function getIconAndTitle(route: string, translate: LocaleContextProps['translate | |
return {icon: Expensicons.Hashtag, title: translate('tabSelector.room')}; | ||
case CONST.TAB_REQUEST.DISTANCE: | ||
return {icon: Expensicons.Car, title: translate('common.distance')}; | ||
case CONST.TAB_SEARCH.ALL: | ||
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. This was only for the POC with onyxTab I assume |
||
return {icon: Expensicons.ExpensifyLogoNew, title: 'All'}; | ||
case CONST.TAB_SEARCH.SENT: | ||
return {icon: Expensicons.ExpensifyLogoNew, title: 'Sent'}; | ||
case CONST.TAB_SEARCH.DRAFTS: | ||
return {icon: Expensicons.ExpensifyLogoNew, title: 'Drafts'}; | ||
case CONST.TAB_SEARCH.WAITING_ON_YOU: | ||
return {icon: Expensicons.ExpensifyLogoNew, title: 'Waiting on you'}; | ||
case CONST.TAB_SEARCH.FINISHED: | ||
return {icon: Expensicons.ExpensifyLogoNew, title: 'Finished'}; | ||
default: | ||
throw new Error(`Route ${route} has no icon nor title set.`); | ||
} | ||
|
This file contains 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 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 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 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 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/libs/Navigation/AppNavigator/Navigators/ActiveRouteContext.ts
This file contains 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,5 +1,6 @@ | ||
import React from 'react'; | ||
import type {CentralPaneNavigatorParamList, NavigationPartialRoute} from '@libs/Navigation/types'; | ||
|
||
const ActiveRouteContext = React.createContext(''); | ||
const ActiveRouteContext = React.createContext<NavigationPartialRoute<keyof CentralPaneNavigatorParamList> | undefined>(undefined); | ||
|
||
export default ActiveRouteContext; |
This file contains 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 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 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 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 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 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
44 changes: 0 additions & 44 deletions
44
src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.native.tsx
This file was deleted.
Oops, something went wrong.
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.
I guess this will be changed after resolving the conflicts