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

chore: support for React Native 0.71.0 #1631

Merged
merged 52 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
46dd0e5
chore: reinstall node_modules & bump REA version
kkafar Nov 8, 2022
247205f
TOREVERT!: build only one arch in FTE
kkafar Nov 8, 2022
f785e52
Reinstall node_modules
kkafar Nov 9, 2022
b273c45
Upgrade react native to 0.70.5 to resolve issues
kkafar Nov 10, 2022
8e1d6ea
Apply changes to package.json & yarn install
kkafar Nov 10, 2022
2713225
Delete .buckconfig file
kkafar Nov 10, 2022
91eabcb
Add eslint ts parser & plugin to eslintrc
kkafar Nov 10, 2022
1cad643
Delete .flowconfig file
kkafar Nov 10, 2022
4c77040
Apply changes to .gitignore
kkafar Nov 10, 2022
59b6480
Update ruby version
kkafar Nov 10, 2022
3436457
Update Gemfile
kkafar Nov 10, 2022
6b1ef86
Delete android/app/_BUCK
kkafar Nov 10, 2022
a7c9751
Apply changes to build.gradle
kkafar Nov 10, 2022
ac41ddd
Delete android/app/build_defs.bzl
kkafar Nov 10, 2022
625f7f9
Update ReactNativeFlipper.java
kkafar Nov 10, 2022
24d454f
Update AndroidManifest
kkafar Nov 10, 2022
19be891
Apply changes to MainActivity
kkafar Nov 10, 2022
2e71d0a
Apply changes to MainApplication.java
kkafar Nov 10, 2022
c03f4f2
Delete MainApplicationReactNativeHost
kkafar Nov 10, 2022
516b8aa
Delete MainCompontnetRegistry
kkafar Nov 10, 2022
f8e8ce5
Delete MainApplicationTurboModuleManagerDelegate
kkafar Nov 10, 2022
0d782dd
Delete android/app/src/main/jni/CMakeLists.txt
kkafar Nov 10, 2022
43da29f
Delete MainApplicationModuleProvider
kkafar Nov 10, 2022
c266607
Delete MainApplicationTurboModuleManagerDelegate
kkafar Nov 10, 2022
b2bb9d0
Delete MainComponentsRegistry
kkafar Nov 10, 2022
276697c
Delete OnLoad
kkafar Nov 10, 2022
e9b4821
Add ReactNativeFlipper in release flavour
kkafar Nov 10, 2022
bd7cc7e
Update android/build.gradle
kkafar Nov 10, 2022
4dbdd94
Update android/gradle.properties
kkafar Nov 10, 2022
9bde528
Do not include ReactAndroid project in settings.gradle
kkafar Nov 10, 2022
8afc422
Add tsconfig
kkafar Nov 10, 2022
7c651c3
Update Podfile
kkafar Nov 10, 2022
7f2d2b8
Update project.pbxproj
kkafar Nov 10, 2022
43bc298
Update AppDelegate.h
kkafar Nov 10, 2022
d089090
Update AppDelegate.mm
kkafar Nov 10, 2022
bff9b97
Update Info.plist
kkafar Nov 10, 2022
60ff171
Whitespace
kkafar Nov 10, 2022
7c158eb
Patch android/build.gradle
kkafar Nov 10, 2022
3950142
Remove ndk version spec from android block in android/app/build.gradle
kkafar Nov 10, 2022
9251049
Updates for FTE
kkafar Jan 6, 2023
e547960
Update podfile in FTE
kkafar Jan 6, 2023
4a6ded3
Merge branch 'main' into @kkafar/rn71
kkafar Jan 6, 2023
aab5d02
JS linter
kkafar Jan 6, 2023
1372ff9
Reinstall node modules
kkafar Jan 6, 2023
e113674
chore: unify CI between platforms (#1676)
kkafar Jan 6, 2023
13de078
Install reanimated from current main
kkafar Jan 6, 2023
1bd6ae5
Change file ext. of main from .m to .mm
kkafar Jan 6, 2023
be10cd4
Add patch for react-native-safe-area-context
kkafar Jan 6, 2023
72765d4
Add fixed GH version with 71 support
kkafar Jan 6, 2023
0dd72cc
chore: RN 0.71.0 for TestsExample (#1679)
kkafar Jan 10, 2023
a996bb6
chore: RN 0.71.0 for FabricExample (#1680)
kkafar Jan 10, 2023
dab9615
Use macos 12 for ios workflow
kkafar Jan 11, 2023
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 .github/workflows/ios-build-test-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'ios/**'
- 'common/**'
- 'src/fabric/**'
- 'FabricExample/**'
- 'FabricTestExample/**'
push:
branches:
- main
Expand All @@ -19,7 +19,7 @@ jobs:
build:
runs-on: macos-12
env:
WORKING_DIRECTORY: FabricExample
WORKING_DIRECTORY: FabricTestExample
concurrency:
group: ios-fabric-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -32,7 +32,7 @@ jobs:
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: 'FabricExample/yarn.lock'
cache-dependency-path: 'FabricTestExample/yarn.lock'

- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
workflow_dispatch:
jobs:
test:
runs-on: macos-latest
runs-on: macos-12
timeout-minutes: 40
env:
WORKING_DIRECTORY: Example
Expand Down
3 changes: 2 additions & 1 deletion Example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ const ExampleApp = (): JSX.Element => (
<Stack.Navigator
screenOptions={{
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
options={{ title: '📱 React Native Screens Examples' }}
Expand Down
17 changes: 10 additions & 7 deletions Example/src/screens/Animations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ const NavigateScreen = ({
const Stack = createNativeStackNavigator<StackParamList>();

const App = (): JSX.Element => {
const [stackAnimation, setStackAnimation] = useState<StackAnimation>(
'default'
);
const [stackAnimation, setStackAnimation] =
useState<StackAnimation>('default');
return (
<Stack.Navigator
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen name="Main" options={{ title: 'Animations' }}>
{({ navigation }) => (
<MainScreen
Expand All @@ -142,7 +142,8 @@ const App = (): JSX.Element => {
name="Push"
options={{
replaceAnimation: 'push',
}}>
}}
>
{({ navigation }) => (
<ReplaceScreen
navigation={navigation}
Expand All @@ -154,7 +155,8 @@ const App = (): JSX.Element => {
name="Pop"
options={{
replaceAnimation: 'pop',
}}>
}}
>
{({ navigation }) => (
<ReplaceScreen
navigation={navigation}
Expand All @@ -166,7 +168,8 @@ const App = (): JSX.Element => {
name="Modal"
options={{
stackPresentation: 'modal',
}}>
}}
>
{({ navigation }) => (
<NavigateScreen
navigation={navigation}
Expand Down
3 changes: 2 additions & 1 deletion Example/src/screens/BottomTabsAndStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ const createStack = (letter: string) => {
headerRight: () => (
<Text testID="bottom-tabs-header-right-id">{letter}</Text>
),
}}>
}}
>
<Stack.Screen name="Details" component={DetailsScreen} />
</Stack.Navigator>
);
Expand Down
14 changes: 8 additions & 6 deletions Example/src/screens/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ const ChatsScreen = ({
nativeBackButtonDismissalEnabled: true,
headerTopInsetEnabled: false,
headerHideBackButton: true,
}}>
}}
>
<NestedStack.Screen name="Privacy" component={PrivacyScreen} />
<NestedStack.Screen name="Options" component={OptionsScreen} />
</NestedStack.Navigator>
Expand Down Expand Up @@ -250,20 +251,21 @@ const Stack = createNativeStackNavigator<StackParamList>();
const NestedStack = createNativeStackNavigator<StackParamList>();

const App = (): JSX.Element => {
const [stackAnimation, setStackAnimation] = useState<StackAnimation>(
'default'
);
const [stackAnimation, setStackAnimation] =
useState<StackAnimation>('default');

return (
<ToastProvider>
<Stack.Navigator
screenOptions={{
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
nativeBackButtonDismissalEnabled: true,
}}>
}}
>
<Stack.Screen
name="Main"
options={{ title: 'Events', headerHideBackButton: true }}>
options={{ title: 'Events', headerHideBackButton: true }}
>
{({ navigation }) => (
<MainScreen
navigation={navigation}
Expand Down
6 changes: 4 additions & 2 deletions Example/src/screens/Gestures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ const DetailsScreen = ({ navigation }: DetailsScreenProps): JSX.Element => {
left: startValue,
width: endValue - startValue,
height: bottomValue - topValue,
}}>
}}
>
<Text style={styles.heading}>Swipe here!</Text>
<Text>
This view presents where you can currently swipe while using the
Expand All @@ -171,7 +172,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
component={MainScreen}
Expand Down
6 changes: 4 additions & 2 deletions Example/src/screens/HeaderOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const SettingsScreen = ({ navigation }: SettingsScreenProps): JSX.Element => {
return (
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={styles.container}>
style={styles.container}
>
<SettingsInput
label="Header title"
value={headerTitle}
Expand Down Expand Up @@ -142,7 +143,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
options={{
Expand Down
3 changes: 2 additions & 1 deletion Example/src/screens/Modals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
component={MainScreen}
Expand Down
8 changes: 4 additions & 4 deletions Example/src/screens/Orientation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ interface FirstScreenProps {
}

const FirstScreen = ({ navigation }: FirstScreenProps): JSX.Element => {
const [screenOrientation, setScreenOrientation] = useState<ScreenOrientation>(
'default'
);
const [screenOrientation, setScreenOrientation] =
useState<ScreenOrientation>('default');

useLayoutEffect(() => {
navigation.setOptions({
Expand Down Expand Up @@ -79,7 +78,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="First"
component={FirstScreen}
Expand Down
24 changes: 12 additions & 12 deletions Example/src/screens/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,15 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => {
const [placeholder, setPlaceholder] = useState('Search for something...');
const [barTintColor, setBarTintColor] = useState<BarTintColor>('white');
const [hintTextColor, setHintTextColor] = useState<BarTintColor>('orange');
const [headerIconColor, setHeaderIconColor] = useState<BarTintColor>(
'orange'
);
const [shouldShowHintSearchIcon, setShouldShowHintSearchIcon] = useState(
true
);
const [headerIconColor, setHeaderIconColor] =
useState<BarTintColor>('orange');
const [shouldShowHintSearchIcon, setShouldShowHintSearchIcon] =
useState(true);
const [hideWhenScrolling, setHideWhenScrolling] = useState(false);
const [obscureBackground, setObscureBackground] = useState(false);
const [hideNavigationBar, setHideNavigationBar] = useState(false);
const [autoCapitalize, setAutoCapitalize] = useState<AutoCapitalize>(
'sentences'
);
const [autoCapitalize, setAutoCapitalize] =
useState<AutoCapitalize>('sentences');
const [inputType, setInputType] = useState<InputType>('text');

useLayoutEffect(() => {
Expand Down Expand Up @@ -115,7 +112,8 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => {
<ScrollView
style={styles.container}
contentInsetAdjustmentBehavior="automatic"
keyboardDismissMode="on-drag">
keyboardDismissMode="on-drag"
>
<SettingsInput
label="Placeholder"
value={placeholder}
Expand Down Expand Up @@ -223,7 +221,8 @@ const SearchScreen = ({ navigation }: SearchScreenProps) => {
return (
<ScrollView
contentInsetAdjustmentBehavior="automatic"
keyboardDismissMode="on-drag">
keyboardDismissMode="on-drag"
>
{places
.filter(
(item) => item.toLowerCase().indexOf(search.toLowerCase()) !== -1
Expand All @@ -247,7 +246,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
component={MainScreen}
Expand Down
3 changes: 2 additions & 1 deletion Example/src/screens/SimpleNativeStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
component={MainScreen}
Expand Down
9 changes: 6 additions & 3 deletions Example/src/screens/StackPresentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const MainScreen = ({ navigation }: MainScreenProps): JSX.Element => {
return (
<ScrollView
style={{ ...styles.container, backgroundColor: 'thistle' }}
testID="stack-presentation-root-scroll-view">
testID="stack-presentation-root-scroll-view"
>
<Button
title="push"
onPress={() => navigation.navigate('Push')}
Expand Down Expand Up @@ -117,7 +118,8 @@ const FullScreenModalScreen = ({
<View style={{ flex: 1 }}>
<ImageBackground
style={styles.image}
source={require('../assets/trees.jpg')}>
source={require('../assets/trees.jpg')}
>
<Button
testID="stack-presentation-fullscreen-modal-go-back-button"
title="Go back"
Expand All @@ -134,7 +136,8 @@ const App = (): JSX.Element => (
screenOptions={{
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="Main"
component={MainScreen}
Expand Down
3 changes: 2 additions & 1 deletion Example/src/screens/StackReactNavigation4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class DetailsScreen extends React.Component<{
...styles.container,
backgroundColor:
colors[Math.floor(Math.random() * Math.floor(colors.length))],
}}>
}}
>
<Text style={styles.text}>Details Screen</Text>
<Button
title="Go to Details... again"
Expand Down
8 changes: 4 additions & 4 deletions Example/src/screens/StatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ interface FirstScreenProps {
const FirstScreen = ({ navigation }: FirstScreenProps): JSX.Element => {
const [statusBarStyle, setStatusBarStyle] = useState<StatusBarStyle>('auto');
const [statusBarHidden, setStatusBarHidden] = useState(false);
const [statusBarAnimation, setStatusBarAnimation] = useState<
StatusBarAnimation
>('fade');
const [statusBarAnimation, setStatusBarAnimation] =
useState<StatusBarAnimation>('fade');
const [statusBarTranslucent, setStatusBarTranslucent] = useState(true);
const [statusBarColor, setStatusBarColor] = useState('gray');

Expand Down Expand Up @@ -117,7 +116,8 @@ const App = (): JSX.Element => (
},
headerHideBackButton: true,
direction: I18nManager.isRTL ? 'rtl' : 'ltr',
}}>
}}
>
<Stack.Screen
name="First"
component={FirstScreen}
Expand Down
6 changes: 4 additions & 2 deletions Example/src/shared/Choose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ export const Choose = (): JSX.Element => {
<View style={styles.row}>
<TouchableOpacity
style={{ ...styles.button, backgroundColor: 'dodgerblue' }}
onPress={() => navigation.goBack()}>
onPress={() => navigation.goBack()}
>
<Text style={styles.buttonText}>Blue pill</Text>
</TouchableOpacity>
<TouchableOpacity
style={{ ...styles.button, backgroundColor: 'crimson' }}
onPress={() => navigation.goBack()}>
onPress={() => navigation.goBack()}
>
<Text style={styles.buttonText}>Red pill</Text>
</TouchableOpacity>
</View>
Expand Down
3 changes: 2 additions & 1 deletion Example/src/shared/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const Dialog = (): JSX.Element => {
<Text style={styles.heading}>Hey! Sign up for our newsletter!</Text>
<TouchableOpacity
style={{ ...styles.button }}
onPress={() => navigation.goBack()}>
onPress={() => navigation.goBack()}
>
<Text style={styles.buttonText}>Please no.</Text>
</TouchableOpacity>
</View>
Expand Down
6 changes: 4 additions & 2 deletions Example/src/shared/SettingsPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function SettingsPicker<T extends string>({
return (
<TouchableOpacity
style={{ ...styles.container, ...style }}
onPress={() => setIsOpen(!isOpen)}>
onPress={() => setIsOpen(!isOpen)}
>
<Text testID={testID} style={styles.label}>{`${label}: ${value}`}</Text>
{isOpen
? items.map((item) => (
Expand All @@ -33,7 +34,8 @@ export function SettingsPicker<T extends string>({
item === value
? { ...styles.item, fontWeight: 'bold' }
: styles.item
}>
}
>
{item}
</Text>
</TouchableOpacity>
Expand Down
3 changes: 2 additions & 1 deletion Example/src/shared/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const Toast = ({
return (
<TouchableOpacity
style={{ ...styles.container, ...style }}
onPress={() => remove(id)}>
onPress={() => remove(id)}
>
<View style={{ ...styles.alert, backgroundColor }}>
<Text style={styles.text}>
{`${index + 1}. `}
Expand Down
Loading