Skip to content

feat(navigation): migrate to react-native-bottom-tabs for native tab navigation#4

Merged
AnnatarHe merged 1 commit intomasterfrom
feat/native-bottom-tabs-migration
Oct 19, 2025
Merged

feat(navigation): migrate to react-native-bottom-tabs for native tab navigation#4
AnnatarHe merged 1 commit intomasterfrom
feat/native-bottom-tabs-migration

Conversation

@AnnatarHe
Copy link
Member

Summary

This PR migrates the bottom tab navigation from @react-navigation/bottom-tabs to react-native-bottom-tabs to leverage native iOS tab bar components, providing better performance and native UI consistency.

Changes

  • Dependencies: Added react-native-bottom-tabs and @bottom-tabs/react-navigation packages
  • Navigation: Updated root tabs to use createNativeBottomTabNavigator instead of createBottomTabNavigator
  • Icons: Replaced React Native Heroicons with native SF Symbols (book.fill, safari.fill, person.crop.circle.fill)
  • Styling: Removed custom BlurView tab bar background in favor of native iOS styling
  • Hooks: Updated useBottomTabBarHeight imports in home and profile pages
  • iOS: Updated Podfile.lock with SwiftUIIntrospect dependency

Benefits

  • Native iOS tab bar appearance and animations
  • Better performance (no JavaScript-based tab bar rendering)
  • Consistent with iOS design guidelines
  • Reduced custom styling complexity

Test plan

  • Test tab navigation on iOS device/simulator
  • Verify tab icons display correctly (SF Symbols)
  • Check tab bar height calculations in home and profile pages
  • Verify safe area insets work properly
  • Test dark mode appearance
  • Ensure all three tabs (Books, Discover, Profile) navigate correctly

🤖 Generated with Claude Code

…navigation

Replace @react-navigation/bottom-tabs with react-native-bottom-tabs to leverage native iOS tab bar components for improved performance and native UI consistency.

Changes:
- Add react-native-bottom-tabs and @bottom-tabs/react-navigation dependencies
- Update root tabs to use createNativeBottomTabNavigator
- Replace tab bar icons with SF Symbols (book.fill, safari.fill, person.crop.circle.fill)
- Update useBottomTabBarHeight imports across home and profile pages
- Remove custom BlurView tab bar background in favor of native styling
- Update iOS Podfile.lock with SwiftUIIntrospect dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @AnnatarHe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the application's bottom tab navigation system on iOS. By transitioning from a JavaScript-based solution to react-native-bottom-tabs, the application will now leverage native iOS tab bar components. This change is expected to deliver a more performant, visually consistent, and integrated user experience that aligns closely with iOS design guidelines, while also simplifying the tab bar's styling implementation.

Highlights

  • Native Tab Navigation Migration: The bottom tab navigation has been migrated from @react-navigation/bottom-tabs to react-native-bottom-tabs to leverage native iOS tab bar components.
  • Performance and UI Consistency: This migration aims to provide better performance and a more native UI experience on iOS, aligning with platform design guidelines.
  • Dependency Updates: New packages react-native-bottom-tabs and @bottom-tabs/react-navigation have been added to the project dependencies.
  • Icon Changes: React Native Heroicons have been replaced with native iOS SF Symbols (book.fill, safari.fill, person.crop.circle.fill) for tab icons.
  • Styling Simplification: Custom BlurView tab bar background styling has been removed in favor of native iOS styling.
  • Hook Import Adjustments: Imports for useBottomTabBarHeight in home.page.tsx and profile.page.tsx have been updated to reflect the new react-native-bottom-tabs library.
  • iOS Podfile Update: The Podfile.lock has been updated to include the SwiftUIIntrospect dependency, which is a requirement for the new native tab library.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@AnnatarHe AnnatarHe merged commit 8be1220 into master Oct 19, 2025
1 check failed
@AnnatarHe AnnatarHe deleted the feat/native-bottom-tabs-migration branch October 19, 2025 05:26
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully migrates the bottom tab navigation to react-native-bottom-tabs, which is a positive change for performance and native UI consistency on iOS. The dependency updates and the main navigator refactoring in root-tabs.tsx are well-executed. However, I've identified a significant issue in src/pages/square/index.tsx where the bottom tab bar height is no longer accounted for, which could lead to UI bugs. I've also pointed out some minor code cleanup opportunities in src/routes/root-tabs.tsx to remove commented-out code.

ItemSeparatorComponent={() => <View style={styles.separator} />}
ListFooterComponent={<View style={{ height: bh + insets.bottom + 16 }} />}
estimatedItemSize={itemSizeCellHeight}
ListFooterComponent={<View style={{ height: 0 + insets.bottom + 16 }} />}

Choose a reason for hiding this comment

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

high

There are a couple of issues with the changes around this line:

  1. Incorrect Footer Height: The ListFooterComponent height is now calculated with 0 instead of the bottom tab bar height (bh). This will likely cause the last items in the list to be hidden behind the tab bar. You should import and use useBottomTabBarHeight from react-native-bottom-tabs to get the correct height, similar to how it's done in the home.page.tsx and profile.page.tsx files.

  2. Missing estimatedItemSize: The estimatedItemSize prop was removed from the FlashList. This prop is important for FlashList performance and should be restored.

To fix this, you'll need to:

  1. Add import { useBottomTabBarHeight } from 'react-native-bottom-tabs';
  2. Call the hook in the component: const bh = useBottomTabBarHeight();
  3. Update the FlashList props as follows:
ListFooterComponent={<View style={{ height: bh + insets.bottom + 16 }} />}
estimatedItemSize={itemSizeCellHeight}

Comment on lines +14 to +15
// tabBarIcon: ({ color, size }) => <HomeIcon color={color} size={size} />
tabBarIcon: () => ({ sfSymbol: 'book.fill' })

Choose a reason for hiding this comment

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

medium

This commented-out code is no longer needed and should be removed to improve code clarity and maintainability.

        tabBarIcon: () => ({ sfSymbol: 'book.fill' })

Comment on lines +23 to +26
// tabBarIcon: ({ color, size }) => (
// <GlobeAmericasIcon color={color} size={size} />
// )
tabBarIcon: () => ({ sfSymbol: 'safari.fill' })

Choose a reason for hiding this comment

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

medium

This commented-out code is no longer needed and should be removed to improve code clarity and maintainability.

        tabBarIcon: () => ({ sfSymbol: 'safari.fill' })

Comment on lines +34 to +35
// tabBarIcon: ({ color, size }) => <UserIcon color={color} size={size} />
tabBarIcon: () => ({ sfSymbol: 'person.crop.circle.fill' })

Choose a reason for hiding this comment

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

medium

This commented-out code is no longer needed and should be removed to improve code clarity and maintainability.

        tabBarIcon: () => ({ sfSymbol: 'person.crop.circle.fill' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant