Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into @alduzy/merge-example…
Browse files Browse the repository at this point in the history
…-apps
  • Loading branch information
alduzy committed Jul 9, 2024
2 parents 86d469f + b4aa349 commit 5dc1318
Show file tree
Hide file tree
Showing 15 changed files with 200 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/android-build-test-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/close-when-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'software-mansion-labs/swmansion-bot'
ref: stable

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios-build-test-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ios-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Test app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn test-e2e-ios
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: ios-fail-screen-shots
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/needs-more-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'software-mansion-labs/swmansion-bot'
ref: stable

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/needs-repro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'software-mansion-labs/swmansion-bot'
ref: stable

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
cancel-in-progress: true
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'software-mansion-labs/swmansion-bot'
ref: stable

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tv-os-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
Expand Down
98 changes: 98 additions & 0 deletions apps/src/tests/Test1645.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/* eslint-disable react-native/no-inline-styles */

import React, {useEffect, useState} from 'react';
import {Text, View} from 'react-native';

import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {createStackNavigator} from '@react-navigation/stack';
import {NavigationContainer} from '@react-navigation/native';

const TestBottomTabBar = createBottomTabNavigator();
const TestNativeStack1 = createNativeStackNavigator();
const TestNativeStack2 = createNativeStackNavigator();

const TestScreen1 = () => {
const [t, setT] = useState(110);

useEffect(() => {
const interval = setInterval(() => {
setT(lastT => lastT + 1);
}, 100);

return () => clearInterval(interval);
}, []);
return (
<View
style={{
flex: 1,
backgroundColor: '#000',
}}>
{Array.from({length: 100}).map((e, idx) => (
<Text style={{color: '#fff'}} key={idx}>
T{idx}: {t}
</Text>
))}
</View>
);
};

const TestScreen2 = () => {
const [t, setT] = useState(0);

useEffect(() => {
const interval = setInterval(() => {
setT(lastT => lastT + 1);
}, 100);

return () => clearInterval(interval);
}, []);

return (
<View
style={{
flex: 1,
backgroundColor: '#000',
}}>
{Array.from({length: 100}).map((e, idx) => (
<Text style={{color: 'red'}} key={idx}>
T{idx}: {t}
</Text>
))}
</View>
);
};
const TestScreenTab1 = () => {
return (
<TestNativeStack1.Navigator initialRouteName="screen1a">
<TestNativeStack1.Screen name="screen1a" component={TestScreen1} />
<TestNativeStack1.Screen name="screen1b" component={TestScreen2} />
</TestNativeStack1.Navigator>
);
};

const TestScreenTab2 = () => {
return (
<TestNativeStack2.Navigator initialRouteName="screen2a">
<TestNativeStack2.Screen name="screen2a" component={TestScreen2} />
<TestNativeStack2.Screen name="screen2b" component={TestScreen1} />
</TestNativeStack2.Navigator>
);
};

const App = () => {
return (
<NavigationContainer>
<TestBottomTabBar.Navigator
initialRouteName="tab1"
screenOptions={{
unmountOnBlur: true,
}}>
<TestBottomTabBar.Screen name="tab1" component={TestScreenTab1} />
<TestBottomTabBar.Screen name="tab2" component={TestScreenTab2} />
</TestBottomTabBar.Navigator>
</NavigationContainer>
);
};

export default App;
72 changes: 72 additions & 0 deletions apps/src/tests/Test432.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { Pressable, View, Button, Text } from 'react-native';

import { NavigationContainer, useNavigation } from '@react-navigation/native';
import {
NativeStackScreenProps,
createNativeStackNavigator,
} from '@react-navigation/native-stack';
import React, { useCallback } from 'react';

type RootStackParamList = {
Home: undefined;
Settings: undefined;
};
type RootStackScreenProps<T extends keyof RootStackParamList> =
NativeStackScreenProps<RootStackParamList, T>;
const HomeScreen = ({ navigation }: RootStackScreenProps<'Home'>) => {
const showSettings = useCallback(() => {
navigation.navigate('Settings');
}, [navigation]);
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Button onPress={showSettings} title={'Show settings'} />
</View>
);
};

const SettingsScreen = ({ navigation }: RootStackScreenProps<'Settings'>) => {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Text>Settings</Text>
</View>
);
};

const RootStack = createNativeStackNavigator<RootStackParamList>();
const RootNavigator = () => {
const navigation = useNavigation();
const headerRight = useCallback(
() => (
<Pressable
onPress={() => {
navigation.goBack();
}}>
<Text>Close</Text>
</Pressable>
),
[navigation],
);
return (
<RootStack.Navigator screenOptions={{ headerShown: false }}>
<RootStack.Screen name="Home" component={HomeScreen} />
<RootStack.Screen
name="Settings"
component={SettingsScreen}
options={{
presentation: 'modal',
animation: 'slide_from_bottom',
headerShown: true,
headerRight: headerRight,
}}
/>
</RootStack.Navigator>
);
};

export default function App() {
return (
<NavigationContainer>
<RootNavigator />
</NavigationContainer>
);
}
2 changes: 2 additions & 0 deletions apps/src/tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { default as Test111 } from './Test111';
export { default as Test263 } from './Test263';
export { default as Test349 } from './Test349';
export { default as Test364 } from './Test364';
export { default as Test432 } from './Test432';
export { default as Test528 } from './Test528';
export { default as Test550 } from './Test550';
export { default as Test556 } from './Test556';
Expand Down Expand Up @@ -81,6 +82,7 @@ export { default as Test1473 } from './Test1473';
export { default as Test1476 } from './Test1476';
export { default as Test1509 } from './Test1509';
export { default as Test1539 } from './Test1539';
export { default as Test1645 } from './Test1645';
export { default as Test1646 } from './Test1646';
export { default as Test1649 } from './Test1649';
export { default as Test1671 } from './Test1671';
Expand Down
Loading

0 comments on commit 5dc1318

Please sign in to comment.