Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/src/tests/Test3236.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ function makeTab(
title={`Change mode (currently ${controllerMode})`}
onPress={() => {
switch (controllerMode) {
case 'automatic':
case 'auto':
setControllerMode('tabBar');
break;
case 'tabBar':
setControllerMode('tabSidebar');
break;
default:
setControllerMode('automatic');
setControllerMode('auto');
break;
}
}}
Expand All @@ -49,7 +49,7 @@ function App() {
);

const [controllerMode, setControllerMode] =
useState<TabBarControllerMode>('automatic');
useState<TabBarControllerMode>('auto');

const TAB_CONFIGS: TabConfiguration[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function ConfigTab() {
tabBarMinimizeBehavior: value,
})
}
items={['automatic', 'onScrollDown', 'onScrollUp', 'never']}
items={['auto', 'onScrollDown', 'onScrollUp', 'never']}
/>
<SettingsPicker<BottomTabsSAVExampleConfig['tabBarItemSystemItem']>
label="tabBarItemSystemItem"
Expand Down
2 changes: 1 addition & 1 deletion apps/src/tests/TestSafeAreaViewIOS/bottom-tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
export default function BottomTabsSAVExample() {
const [exampleConfig, setExampleConfig] =
useState<BottomTabsSAVExampleConfig>({
tabBarMinimizeBehavior: 'automatic',
tabBarMinimizeBehavior: 'auto',
tabBarItemSystemItem: 'disabled',
content: 'regularView',
safeAreaTopEdge: true,
Expand Down
4 changes: 2 additions & 2 deletions ios/RNSEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ typedef NS_ENUM(NSInteger, RNSBottomTabsIconType) {

#if !RCT_NEW_ARCH_ENABLED
typedef NS_ENUM(NSInteger, RNSTabBarMinimizeBehavior) {
RNSTabBarMinimizeBehaviorAutomatic,
RNSTabBarMinimizeBehaviorAuto,
RNSTabBarMinimizeBehaviorNever,
RNSTabBarMinimizeBehaviorOnScrollDown,
RNSTabBarMinimizeBehaviorOnScrollUp,
Expand All @@ -140,7 +140,7 @@ typedef NS_ENUM(NSInteger, RNSTabBarMinimizeBehavior) {

#if !RCT_NEW_ARCH_ENABLED
typedef NS_ENUM(NSInteger, RNSTabBarControllerMode) {
RNSTabBarControllerModeAutomatic,
RNSTabBarControllerModeAuto,
RNSTabBarControllerModeTabBar,
RNSTabBarControllerModeTabSidebar,
};
Expand Down
4 changes: 2 additions & 2 deletions ios/bottom-tabs/RCTConvert+RNSBottomTabs.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
RCT_ENUM_CONVERTER(
RNSTabBarMinimizeBehavior,
(@{
@"automatic" : @(RNSTabBarMinimizeBehaviorAutomatic),
@"automatic" : @(RNSTabBarMinimizeBehaviorAuto),
@"never" : @(RNSTabBarMinimizeBehaviorNever),
@"onScrollDown" : @(RNSTabBarMinimizeBehaviorOnScrollDown),
@"onScrollUp" : @(RNSTabBarMinimizeBehaviorOnScrollUp),
}),
RNSTabBarMinimizeBehaviorAutomatic,

Check failure on line 30 in ios/bottom-tabs/RCTConvert+RNSBottomTabs.mm

View workflow job for this annotation

GitHub Actions / build

use of undeclared identifier 'RNSTabBarMinimizeBehaviorAutomatic'; did you mean 'RNSTabBarMinimizeBehaviorAuto'?
integerValue)

RCT_ENUM_CONVERTER(
RNSTabBarControllerMode,
(@{
@"automatic" : @(RNSTabBarControllerModeAutomatic),
@"automatic" : @(RNSTabBarControllerModeAuto),
@"tabBar" : @(RNSTabBarControllerModeTabBar),
@"tabSidebar" : @(RNSTabBarControllerModeTabSidebar),
}),
RNSTabBarControllerModeAutomatic,

Check failure on line 40 in ios/bottom-tabs/RCTConvert+RNSBottomTabs.mm

View workflow job for this annotation

GitHub Actions / build

use of undeclared identifier 'RNSTabBarControllerModeAutomatic'; did you mean 'UITabBarControllerModeAutomatic'?
integerValue)

RCT_ENUM_CONVERTER(
Expand Down
8 changes: 4 additions & 4 deletions ios/bottom-tabs/RNSBottomTabsHostComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ - (void)updateProps:(const facebook::react::Props::Shared &)props
_controller.tabBarMinimizeBehavior = _tabBarMinimizeBehavior;
} else
#endif // Check for iOS >= 26
if (newComponentProps.tabBarMinimizeBehavior != react::RNSBottomTabsTabBarMinimizeBehavior::Automatic) {
if (newComponentProps.tabBarMinimizeBehavior != react::RNSBottomTabsTabBarMinimizeBehavior::Auto) {
RCTLogWarn(@"[RNScreens] tabBarMinimizeBehavior is supported for iOS >= 26");
}
}
Expand All @@ -274,7 +274,7 @@ - (void)updateProps:(const facebook::react::Props::Shared &)props
_controller.mode = _tabBarControllerMode;
} else
#endif // Check for iOS >= 18
if (newComponentProps.tabBarControllerMode != react::RNSBottomTabsTabBarControllerMode::Automatic) {
if (newComponentProps.tabBarControllerMode != react::RNSBottomTabsTabBarControllerMode::Auto) {
RCTLogWarn(@"[RNScreens] tabBarControllerMode is supported for iOS >= 18");
}
}
Expand Down Expand Up @@ -440,7 +440,7 @@ - (void)setTabBarMinimizeBehaviorFromRNSTabBarMinimizeBehavior:(RNSTabBarMinimiz
_controller.tabBarMinimizeBehavior = _tabBarMinimizeBehavior;
} else
#endif // Check for iOS >= 26
if (tabBarMinimizeBehavior != RNSTabBarMinimizeBehaviorAutomatic) {
if (tabBarMinimizeBehavior != RNSTabBarMinimizeBehaviorAuto) {
RCTLogWarn(@"[RNScreens] tabBarMinimizeBehavior is supported for iOS >= 26");
}
}
Expand All @@ -454,7 +454,7 @@ - (void)setTabBarControllerModeFromRNSTabBarControllerMode:(RNSTabBarControllerM
_controller.mode = _tabBarControllerMode;
} else
#endif // Check for iOS >= 18
if (tabBarControllerMode != RNSTabBarControllerModeAutomatic) {
if (tabBarControllerMode != RNSTabBarControllerModeAuto) {
RCTLogWarn(@"[RNScreens] tabBarControllerMode is supported for iOS >= 18");
}
}
Expand Down
4 changes: 2 additions & 2 deletions ios/conversion/RNSConversions-BottomTabs.mm
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ UITabBarControllerMode UITabBarControllerModeFromRNSBottomTabsTabBarControllerMo
using enum facebook::react::RNSBottomTabsTabBarControllerMode;

switch (tabBarControllerMode) {
case Automatic:
case Auto:
return UITabBarControllerModeAutomatic;
case TabBar:
return UITabBarControllerModeTabBar;
Expand All @@ -203,7 +203,7 @@ UITabBarControllerMode UITabBarControllerModeFromRNSBottomTabsTabBarControllerMo
UITabBarControllerMode UITabBarControllerModeFromRNSTabBarControllerMode(RNSTabBarControllerMode tabBarDisplayMode)
{
switch (tabBarDisplayMode) {
case RNSTabBarControllerModeAutomatic:
case RNSTabBarControllerModeAuto:
return UITabBarControllerModeAutomatic;
case RNSTabBarControllerModeTabBar:
return UITabBarControllerModeTabBar;
Expand Down
8 changes: 4 additions & 4 deletions src/components/bottom-tabs/BottomTabs.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export type TabBarItemLabelVisibilityMode =

// iOS-specific
export type TabBarMinimizeBehavior =
| 'automatic'
| 'auto'
| 'never'
| 'onScrollDown'
| 'onScrollUp';

// iOS-specific
export type TabBarControllerMode = 'automatic' | 'tabBar' | 'tabSidebar';
export type TabBarControllerMode = 'auto' | 'tabBar' | 'tabSidebar';

export interface BottomTabsProps extends ViewProps {
// #region Events
Expand Down Expand Up @@ -167,7 +167,7 @@ export interface BottomTabsProps extends ViewProps {
*
* The following values are currently supported:
*
* - `automatic` - resolves to the system default minimize behavior
* - `auto` - resolves to the system default minimize behavior
* - `never` - the tab bar does not minimize
* - `onScrollDown` - the tab bar minimizes when scrolling down and
* expands when scrolling back up
Expand All @@ -191,7 +191,7 @@ export interface BottomTabsProps extends ViewProps {
*
* The following values are currently supported:
*
* - `automatic` - the system sets the display mode based on the tab’s content
* - `auto` - the system sets the display mode based on the tab’s content
* - `tabBar` - the system displays the content only as a tab bar
* - `tabSidebar` - the tab bar is displayed as a sidebar
*
Expand Down
12 changes: 4 additions & 8 deletions src/fabric/bottom-tabs/BottomTabsNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ type TabBarItemLabelVisibilityMode =
| 'labeled'
| 'unlabeled';

type TabBarMinimizeBehavior =
| 'automatic'
| 'never'
| 'onScrollDown'
| 'onScrollUp';
type TabBarMinimizeBehavior = 'auto' | 'never' | 'onScrollDown' | 'onScrollUp';

type TabBarControllerMode = 'automatic' | 'tabBar' | 'tabSidebar';
type TabBarControllerMode = 'auto' | 'tabBar' | 'tabSidebar';

export interface NativeProps extends ViewProps {
// Events
Expand Down Expand Up @@ -62,8 +58,8 @@ export interface NativeProps extends ViewProps {

// iOS-specific
tabBarTintColor?: ColorValue;
tabBarMinimizeBehavior?: WithDefault<TabBarMinimizeBehavior, 'automatic'>;
tabBarControllerMode?: WithDefault<TabBarControllerMode, 'automatic'>;
tabBarMinimizeBehavior?: WithDefault<TabBarMinimizeBehavior, 'auto'>;
tabBarControllerMode?: WithDefault<TabBarControllerMode, 'auto'>;

// Control

Expand Down
6 changes: 3 additions & 3 deletions src/gesture-handler/fabricUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

import { View } from "react-native";
import { View } from 'react-native';

/* eslint-disable */

Expand All @@ -24,11 +24,11 @@ export function getShadowNodeWrapperAndTagFromRef(ref: View | null): {
return {
shadowNodeWrapper: null,
tag: -1,
}
};
}
const internalRef = ref as unknown as HostInstance;
return {
shadowNodeWrapper: internalRef.__internalInstanceHandle.stateNode.node,
tag: internalRef.__nativeTag,
}
};
}
Loading