Skip to content
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

native, ui: move from TabStack to new custom NavBar component #3513

Conversation

jamesacklin
Copy link
Member

@jamesacklin jamesacklin commented May 14, 2024

Renovates the app navigation to use nested Native Stacks and a custom NavBar component.

  • Rather than using createBottomTabNavigator, uses createNativeStackNavigator for all nested "home" screens (ChatList, Channel, Post, ChannelSearch).
  • Adds a custom navigation component (NavBar) in packages/ui which seeks to be as generic as possible
  • Adds a NavBarView to the app screens themselves, which in turn takes the navigation prop from the parent screen and handles all the navigate() calls itself

Functionality is exactly the same as before but eliminates the gray box on view transition (fixes LAND-1873). Thanks to @patosullivan for the talk-through assist.

Note that this is an absolutely-positioned element, so any screen that uses a scroller that extends below the bottom edge of the screen will need to be padded up at the bottom.

Copy link

linear bot commented May 14, 2024

Copy link
Collaborator

@dnbrwstr dnbrwstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! A few nitpicks.

packages/ui/src/components/ChatList.tsx Outdated Show resolved Hide resolved
packages/ui/src/components/NavBar/NavIcon.tsx Outdated Show resolved Hide resolved
packages/ui/src/components/ProfileScreenView.tsx Outdated Show resolved Hide resolved
packages/ui/src/tamagui.config.ts Outdated Show resolved Hide resolved
@jamesacklin jamesacklin requested a review from dnbrwstr May 14, 2024 20:11
@jamesacklin jamesacklin merged commit b079456 into develop May 15, 2024
1 check failed
@jamesacklin jamesacklin deleted the james/land-1873-native-gray-box-in-place-of-tab-bar-when-navigating-into branch May 15, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants