-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix bottom tab highlight delay #44931
Merged
luacmartins
merged 17 commits into
Expensify:main
from
Zakpak0:zakpak0/bugfix-issue-#44587
Jul 11, 2024
Merged
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e322104
bugfix: unmount inbox component on navigation away
Zakpak0 40d1378
bugfix: useActiveRoute in web bottom tabs
Zakpak0 176471e
bugfix: check whether route name is defined
Zakpak0 1c05f2d
bugfix: bottom tab regression
Zakpak0 5af3b4b
bugfix: impliment search tab fix by @luacmartins
Zakpak0 c7e6e35
improvement: removed unneeded selector
Zakpak0 3d6cd89
chore: remove redudant flatten object function
Zakpak0 d88c2fb
improvement: fix type errors
Zakpak0 ca188c1
improvement: use const vs let
Zakpak0 60ed14b
improvement: renamed variables
Zakpak0 42b0bfa
chore: corrected linting errors
Zakpak0 4da8ca0
Merge branch 'main' into zakpak0/bugfix-issue-#44587
Zakpak0 cc78e63
Merge branch 'main' into zakpak0/bugfix-issue-#44587
Zakpak0 d8a362d
Merge branch 'main' into zakpak0/bugfix-issue-#44587
Zakpak0 0eae14c
chore: fix type errors
Zakpak0 59a997f
chore: fix linting errors
Zakpak0 706148d
Merge remote-tracking branch 'upstream/main' into zakpak0/bugfix-issu…
Zakpak0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {useContext} from 'react'; | ||
import ActiveBottomTabRouteContext from '@libs/Navigation/AppNavigator/Navigators/ActiveBottomTabRouteContext'; | ||
|
||
function useActiveBottomTabRoute() { | ||
return useContext(ActiveBottomTabRouteContext); | ||
} | ||
|
||
export default useActiveBottomTabRoute; |
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
src/libs/Navigation/AppNavigator/Navigators/ActiveBottomTabRouteContext.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import type {BottomTabScreensParamList, NavigationPartialRoute} from '@libs/Navigation/types'; | ||
|
||
const ActiveBottomTabRouteContext = React.createContext<NavigationPartialRoute<keyof BottomTabScreensParamList> | undefined>(undefined); | ||
|
||
export default ActiveBottomTabRouteContext; |
6 changes: 0 additions & 6 deletions
6
src/libs/Navigation/AppNavigator/Navigators/ActiveRouteContext.ts
This file was deleted.
Oops, something went wrong.
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
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.
Hey @Zakpak0, I am working on some navigation changes and I noticed these new types. Could you please explain to me why this type is necessary? I don't see any navigator named
SearchNavigator
.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.
Np @adamgrzybowski , happy to.
If I recall correctly, I was having a hard time finding an existing type that defined the search tab's routes in isolation.
I created that to supplement the creation of this type here.
Maybe a better name for it would be SearchTabRoutes.
This is my first time touching the code base and I was attempting to follow the patterns I saw.
Even if I was being a bit naive.
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.
Please feel free to mini-refactor if you're working on this at the moment and you see fit, as long as this PRs changes won't throw type errors I think you're good to go!