Skip to content

Comments

chore(Tabs): align naming for native components#3658

Merged
kligarski merged 5 commits intomainfrom
@kligarski/align-native-components-naming-tabs
Feb 23, 2026
Merged

chore(Tabs): align naming for native components#3658
kligarski merged 5 commits intomainfrom
@kligarski/align-native-components-naming-tabs

Conversation

@kligarski
Copy link
Contributor

@kligarski kligarski commented Feb 17, 2026

Description

Aligns naming for native components in tabs (TabsHost, TabsScreen, TabsBottomAccessory).

Closes https://github.com/software-mansion/react-native-screens-labs/issues/782.

Changes

  • renaming of iOS native components
  • renaming of Android native components
  • renaming of Fabric spec files
  • renaming of .h/.cpp ShadowTree files

Before & after - visual documentation

No visual changes.

Test plan

Tabs should work without any changes on both platforms & both architectures.

Checklist

  • Ensured that CI passes

@kligarski kligarski self-assigned this Feb 17, 2026
@kligarski kligarski marked this pull request as ready for review February 17, 2026 10:57
@kmichalikk kmichalikk requested a review from Copilot February 17, 2026 12:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request performs a comprehensive renaming of the tabs native components to align with more consistent naming conventions. The PR renames RNSBottomTabs to RNSTabsHost, RNSBottomTabsScreen to RNSTabsScreen, and RNSBottomTabsAccessory to RNSTabsBottomAccessory. This is a pure refactoring change that maintains all functionality while improving code organization and naming consistency.

Changes:

  • Renamed all TypeScript native component specifications from BottomTabs* to Tabs* patterns
  • Renamed iOS native components, event emitters, and view controllers with new naming scheme
  • Renamed Android ViewManagers and reorganized package structure (introduced host and screen sub-packages within gamma.tabs)
  • Renamed C++ Fabric ShadowNode, State, and ComponentDescriptor files to match new naming
  • Added codegenUtils.ts file (copied from react-native-svg) for UnsafeMixed type helper

Reviewed changes

Copilot reviewed 89 out of 92 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/fabric/tabs/TabsScreenNativeComponent.ts Updated component name from RNSBottomTabsScreen to RNSTabsScreen
src/fabric/tabs/TabsHostNativeComponent.ts Updated component name from RNSBottomTabs to RNSTabsHost
src/fabric/tabs/TabsBottomAccessoryNativeComponent.ts Updated component name from RNSBottomTabsAccessory to RNSTabsBottomAccessory
src/fabric/tabs/TabsBottomAccessoryContentNativeComponent.ts Updated component name from RNSBottomTabsAccessoryContent to RNSTabsBottomAccessoryContent
src/fabric/tabs/codegenUtils.ts New file: adds UnsafeMixed type helper for codegen
src/components/tabs/TabsScreen.tsx Updated imports to use new TabsScreenNativeComponent path
src/components/tabs/TabsHost.tsx Updated imports to use new TabsHostNativeComponent path
src/components/tabs/TabsAccessory.tsx Updated imports to use new TabsBottomAccessoryNativeComponent
src/components/tabs/TabsAccessoryContent.tsx Updated imports to use new TabsBottomAccessoryContentNativeComponent
ios/tabs/screen/*.{h,mm} Renamed all iOS screen-related classes from RNSBottomTabsScreen* to RNSTabsScreen*
ios/tabs/host/*.{h,mm} Renamed all iOS host-related classes from RNSBottomTabsHost* to RNSTabsHost*
ios/tabs/bottom-accessory/*.{h,mm} Renamed all iOS accessory classes from RNSBottomTabsAccessory* to RNSTabsBottomAccessory* and RNSBottomAccessoryHelper to RNSTabsBottomAccessoryHelper
ios/tabs/RCTConvert+RNSTabs.{h,mm} Renamed category and updated enum type names
ios/tabs/RNSTabBarAppearanceCoordinator.{h,mm} Updated type references and imports
ios/conversion/RNSConversions*.{h,mm} Updated all conversion function names to use Tabs* naming
ios/utils/RNSDefines.h Renamed macro from RNS_BOTTOM_ACCESSORY_AVAILABLE to RNS_TABS_BOTTOM_ACCESSORY_AVAILABLE
ios/RNSEnums.h Renamed enums from RNSBottomTabs* to RNSTabs*
android/src/main/java/.../tabs/screen/*.kt Moved screen classes to screen sub-package and renamed manager from TabScreenViewManager to TabsScreenViewManager
android/src/main/java/.../tabs/screen/event/*.kt Moved event classes to screen.event package
android/src/main/java/.../tabs/host/*.kt Moved host classes to host sub-package
android/src/main/java/.../tabs/host/event/*.kt Moved host event class to host.event package
android/src/paper/java/.../viewmanagers/RNSTabs* Renamed Paper architecture interface and delegate classes
android/src/main/jni/rnscreens.h Updated include to use RNSTabsHostComponentDescriptor.h
common/cpp/.../RNSTabsHost* Renamed all TabsHost-related C++ files and classes
common/cpp/.../RNSTabsBottomAccessory* Renamed all TabsBottomAccessory-related C++ files and classes
package.json Updated Fabric component class name mappings
react-native.config.js Updated descriptor name from RNSBottomTabsComponentDescriptor to RNSTabsHostComponentDescriptor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@kmichalikk kmichalikk left a comment

Choose a reason for hiding this comment

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

Some thoughts:

  1. Let's maybe move the resource id refactor to separate PR

  2. You might also create a PR for moving android tabs from gamma/ folder

  3. There are still few places where BottomTabs could be replaced with Tabs, i.e. in GUIDE_FOR_LIBRARY_AUTHORS and code comments (ctrl + f). There is also controlledBottomTabs flag - should we change it?

@kligarski kligarski force-pushed the @kligarski/align-native-components-naming-tabs branch from cbd71b6 to f2cba90 Compare February 17, 2026 14:35
@kligarski
Copy link
Contributor Author

1. Let's maybe move the resource id refactor to separate PR
2. You might also create a PR for moving android tabs from `gamma/` folder

Will do so in separate PR(s).

3. There are still few places where BottomTabs could be replaced with Tabs, i.e. in GUIDE_FOR_LIBRARY_AUTHORS and code comments (ctrl + f). There is also `controlledBottomTabs` flag - should we change it?

I think this should be handled in separate PRs. I added a ticket to rename controlledBottomTabs: https://github.com/software-mansion/react-native-screens-labs/issues/974.

@kligarski kligarski requested a review from kmichalikk February 17, 2026 15:07
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

The code changes look good. I've checked only the diff.

I haven't verified runtime behavior. Please make sure you do.

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

One thing I'm mising here is usage of TabsScreen on Android, right? We should keep it aligned between platforms

@kligarski
Copy link
Contributor Author

One thing I'm mising here is usage of TabsScreen on Android, right? We should keep it aligned between platforms

Thank you for spotting this, don't know how I've missed that 😅

09737f9

@kligarski
Copy link
Contributor Author

kligarski commented Feb 23, 2026

I haven't verified runtime behavior. Please make sure you do.

I've checked TestBottomTabs on {Android, iOS} x {Paper, Fabric} and it looks good. I'll wait for the CI and proceed.

@kligarski kligarski merged commit 0f9704d into main Feb 23, 2026
11 checks passed
@kligarski kligarski deleted the @kligarski/align-native-components-naming-tabs branch February 23, 2026 13:40
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.

3 participants