- 
                Notifications
    
You must be signed in to change notification settings  - Fork 590
 
chore: upgrade react-navigation to latest #12821
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
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            5 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      93a9cfe
              
                chore: upgrade react-navigation to latest
              
              
                MounirDhahri 446139d
              
                chore: update patch
              
              
                MounirDhahri 227d60c
              
                chore: address review comments
              
              
                MounirDhahri fbca6e7
              
                chore: upgrade podfile.lock again
              
              
                MounirDhahri db98951
              
                chore: patch src and types
              
              
                MounirDhahri 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
    
  
  
    
              
        
          
          
            89 changes: 46 additions & 43 deletions
          
          89 
        
  ...@react-navigation+bottom-tabs+7.3.3.patch → ...@react-navigation+bottom-tabs+7.4.8.patch
  
  
      
      
   
        
      
      
    
  
    
      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,80 +1,83 @@ | ||
| diff --git a/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js b/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js | ||
| index 8f0fb1c..bfc1cfc 100644 | ||
| --- a/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js | ||
| +++ b/node_modules/@react-navigation/bottom-tabs/lib/commonjs/views/BottomTabBar.js | ||
| @@ -131,6 +131,7 @@ function BottomTabBar({ | ||
| tabBarShowLabel, | ||
| tabBarLabelPosition, | ||
| tabBarHideOnKeyboard = false, | ||
| + tabBarVisible = false, | ||
| tabBarVisibilityAnimationConfig, | ||
| tabBarVariant = 'uikit', | ||
| tabBarStyle, | ||
| @@ -149,7 +150,7 @@ function BottomTabBar({ | ||
| const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)(); | ||
| const isKeyboardShown = (0, _useIsKeyboardShown.useIsKeyboardShown)(); | ||
| const onHeightChange = _react.default.useContext(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext); | ||
| - const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); | ||
| + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown) && !tabBarVisible; | ||
| const visibilityAnimationConfigRef = _react.default.useRef(tabBarVisibilityAnimationConfig); | ||
| _react.default.useEffect(() => { | ||
| visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig; | ||
| @@ -251,6 +252,10 @@ function BottomTabBar({ | ||
| outputRange: [layout.height + insets[tabBarPosition === 'top' ? 'top' : 'bottom'] + _reactNative.StyleSheet.hairlineWidth, 0] | ||
| }) | ||
| }], | ||
| + opacity: visible.interpolate({ | ||
| + inputRange: [0, 1], | ||
| + outputRange: [0, 1] | ||
| + }), | ||
| // Absolutely position the tab bar so that the content is below it | ||
| // This is needed to avoid gap at bottom when the tab bar is hidden | ||
| position: isTabBarHidden ? 'absolute' : undefined | ||
| diff --git a/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js b/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js | ||
| index dbde384..ec63cde 100644 | ||
| index cb4e310..ecacb80 100644 | ||
| --- a/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js | ||
| +++ b/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js | ||
| @@ -124,6 +124,7 @@ export function BottomTabBar({ | ||
| @@ -123,6 +123,7 @@ export function BottomTabBar({ | ||
| tabBarShowLabel, | ||
| tabBarLabelPosition, | ||
| tabBarHideOnKeyboard = false, | ||
| + tabBarVisible = false, | ||
| tabBarVisibilityAnimationConfig, | ||
| tabBarVariant = 'uikit', | ||
| tabBarStyle, | ||
| @@ -142,7 +143,7 @@ export function BottomTabBar({ | ||
| const dimensions = useSafeAreaFrame(); | ||
| @@ -140,7 +141,7 @@ export function BottomTabBar({ | ||
| } | ||
| const isKeyboardShown = useIsKeyboardShown(); | ||
| const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext); | ||
| - const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); | ||
| + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown) && !tabBarVisible; | ||
| const visibilityAnimationConfigRef = React.useRef(tabBarVisibilityAnimationConfig); | ||
| React.useEffect(() => { | ||
| visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig; | ||
| @@ -244,6 +245,10 @@ export function BottomTabBar({ | ||
| @@ -241,8 +242,12 @@ export function BottomTabBar({ | ||
| translateY: visible.interpolate({ | ||
| inputRange: [0, 1], | ||
| outputRange: [layout.height + insets[tabBarPosition === 'top' ? 'top' : 'bottom'] + StyleSheet.hairlineWidth, 0] | ||
| }) | ||
| - }) | ||
| + }), | ||
| }], | ||
| + opacity: visible.interpolate({ | ||
| + inputRange: [0, 1], | ||
| + outputRange: [0, 1] | ||
| + }), | ||
| + }), | ||
| // Absolutely position the tab bar so that the content is below it | ||
| // This is needed to avoid gap at bottom when the tab bar is hidden | ||
| position: isTabBarHidden ? 'absolute' : undefined | ||
| diff --git a/node_modules/@react-navigation/bottom-tabs/src/types.tsx b/node_modules/@react-navigation/bottom-tabs/src/types.tsx | ||
| index 02f7119..01dfabc 100644 | ||
| index 2438b03..eaa6d4b 100644 | ||
| --- a/node_modules/@react-navigation/bottom-tabs/src/types.tsx | ||
| +++ b/node_modules/@react-navigation/bottom-tabs/src/types.tsx | ||
| @@ -224,6 +224,11 @@ export type BottomTabNavigationOptions = HeaderOptions & { | ||
| @@ -239,6 +239,11 @@ export type BottomTabNavigationOptions = HeaderOptions & { | ||
| */ | ||
| tabBarHideOnKeyboard?: boolean; | ||
| tabBarVariant?: Variant; | ||
| 
     | 
||
| + /** | ||
| + * Whether the tab bar gets hidden when the screen is focused. Defaults to `false`. | ||
| + */ | ||
| + tabBarVisible?: boolean; | ||
| + | ||
| /** | ||
| * Animation config for showing and hiding the tab bar when the keyboard is shown/hidden. | ||
| * Style object for the tab bar container. | ||
| */ | ||
| diff --git a/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx b/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx | ||
| index 55b9c8f..816b028 100644 | ||
| --- a/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx | ||
| +++ b/node_modules/@react-navigation/bottom-tabs/src/views/BottomTabBar.tsx | ||
| @@ -175,6 +175,7 @@ export function BottomTabBar({ | ||
| tabBarVariant = 'uikit', | ||
| tabBarStyle, | ||
| tabBarBackground, | ||
| + tabBarVisible = false, | ||
| tabBarActiveTintColor, | ||
| tabBarInactiveTintColor, | ||
| tabBarActiveBackgroundColor, | ||
| @@ -205,7 +206,7 @@ export function BottomTabBar({ | ||
| 
     | 
||
| const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext); | ||
| 
     | 
||
| - const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown); | ||
| + const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown) && !tabBarVisible | ||
| 
     | 
||
| const visibilityAnimationConfigRef = React.useRef( | ||
| tabBarVisibilityAnimationConfig | ||
| @@ -367,6 +368,10 @@ export function BottomTabBar({ | ||
| 0, | ||
| ], | ||
| }), | ||
| + opacity: visible.interpolate({ | ||
| + inputRange: [0, 1], | ||
| + outputRange: [0, 1], | ||
| + }), | ||
| }, | ||
| ], | ||
| // Absolutely position the tab bar so that the content is below it | 
      
      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.