Skip to content

Commit

Permalink
Add repro with old solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed Sep 26, 2024
1 parent e238dda commit 2138a88
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 127 deletions.
8 changes: 4 additions & 4 deletions apps/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import { enableFreeze } from 'react-native-screens';
import Example from './Example';
// import * as Test from './src/tests';
// import Example from './Example';
import * as Test from './src/tests';

enableFreeze(true);

export default function App() {
return <Example />;
// return <Test.Test42 />;
// return <Example />;
return <Test.Test2175 />;
}
131 changes: 131 additions & 0 deletions apps/src/tests/Test2175.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
import React from 'react';
import { Button, Modal, SafeAreaView, Text, View } from 'react-native';

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

const Stack = createNativeStackNavigator();
const Tabs = createBottomTabNavigator();


function TabScreens({ navigation }): React.JSX.Element {
return (
<Tabs.Navigator>
<Tabs.Screen name='A' component={HomeScreen} />
<Tabs.Screen name='B' component={TabHomeScreen} />
</Tabs.Navigator>
);
}

function TabHomeScreen({ navigation }): React.JSX.Element {
return (
<View style={{ flex: 1, backgroundColor: 'lightseagreen', justifyContent: 'center', }}>
<Text>Where do you where do you go, my lovely, oh oh oh oh</Text>
<Button title='Show owned transparentModal' onPress={() => { navigation.navigate('TransparentModal') }} />
<Button title='Show owned modal' onPress={() => { navigation.navigate('Modal') }} />
<Button title='Show tabs' onPress={() => { navigation.navigate('Tabs') }} />
</View>
)
}


function HomeScreen({ navigation }): React.JSX.Element {
const [toggle, setToggle] = React.useState(false);
return (
<View style={{ flex: 1, backgroundColor: 'lightseagreen', justifyContent: 'center', }}>
<Text>Where do you where do you go, my lovely, oh oh oh oh</Text>
<Button title='Show owned transparentModal' onPress={() => { navigation.navigate('TransparentModal') }} />
<Button title='Show owned modal' onPress={() => { navigation.navigate('Modal') }} />
<Button title='Show tabs' onPress={() => { navigation.navigate('Tabs') }} />
<Button title='Show foreign modal' onPress={() => { setToggle(old => !old) }} />
<Modal
visible={toggle}
onRequestClose={() => setToggle(false)}
presentationStyle='formSheet'
animationType='slide'
>
<View style={{ flex: 1, backgroundColor: 'lightblue' }}>
<Text>Hello I'm a foreign modal</Text>
<Button title='Close foreign modal' onPress={() => { setToggle(false) }} />
</View>
</Modal>
</View>
)
}

function ModalScreen({ navigation }): React.JSX.Element {
const [toggle, setToggle] = React.useState(false);

return (
<View style={{ flex: 1, backgroundColor: 'lightcoral', opacity: 0.4 }}>
<Text>Where do you where do you go, my lovely, oh oh oh oh</Text>
<Button title='Go back' onPress={() => { navigation.goBack() }} />
<View style={{ width: '100%', height: 50, backgroundColor: 'red' }} />
<Button title='Show foreign modal' onPress={() => { setToggle(old => !old) }} />
<Modal
visible={toggle}
onRequestClose={() => setToggle(false)}
presentationStyle='formSheet'
animationType='slide'
>
<View style={{ flex: 1, backgroundColor: 'lightblue' }}>
<Text>Hello I'm a foreign modal</Text>
<Button title='Close foreign modal' onPress={() => { setToggle(false) }} />
</View>
</Modal>
</View>
)
}


const TestScreen = ({ navigation }): React.JSX.Element => {
return (
<SafeAreaView>
<Button
title={
'Click me and drag around a bit and I should log something still'
}
onPress={() => {
console.log(Date.now());
}}
/>
<Button
title={'Navigate to modal'}
onPress={() => {
navigation.navigate('Test2');
}}
/>
</SafeAreaView>
);
};

function App(): React.JSX.Element {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName='Tabs'>
<Stack.Screen name='Tabs' component={TabScreens} options={{ headerShown: false }} />
<Stack.Screen
name="Home"
component={HomeScreen}
/>
<Stack.Screen
name="TransparentModal"
component={ModalScreen}
options={{
presentation: 'transparentModal',
}}
/>
<Stack.Screen
name="Modal"
component={ModalScreen}
options={{
presentation: 'modal',
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}

export default App;
232 changes: 117 additions & 115 deletions apps/src/tests/index.ts
Original file line number Diff line number Diff line change
@@ -1,117 +1,119 @@
// @ts-nocheck

export { default as Test42 } from './Test42';
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';
export { default as Test564 } from './Test564';
export { default as Test577 } from './Test577';
export { default as Test593 } from './Test593';
export { default as Test619 } from './Test619';
export { default as Test624 } from './Test624';
export { default as Test640 } from './Test640';
export { default as Test642 } from './Test642';
export { default as Test645 } from './Test645';
export { default as Test648 } from './Test648';
export { default as Test649 } from './Test649';
export { default as Test654 } from './Test654';
export { default as Test658 } from './Test658';
export { default as Test662 } from './Test662';
export { default as Test691 } from './Test691';
export { default as Test702 } from './Test702';
export { default as Test706 } from './Test706';
export { default as Test713 } from './Test713';
export { default as Test726 } from './Test726';
export { default as Test748 } from './Test748';
export { default as Test750 } from './Test750';
export { default as Test758 } from './Test758';
export { default as Test761 } from './Test761';
export { default as Test779 } from './Test779';
export { default as Test780 } from './Test780';
export { default as Test791 } from './Test791';
export { default as Test800 } from './Test800';
export { default as Test817 } from './Test817';
export { default as Test830 } from './Test830';
export { default as Test831 } from './Test831';
export { default as Test844 } from './Test844';
export { default as Test852 } from './Test852';
export { default as Test860 } from './Test860';
export { default as Test861 } from './Test861';
export { default as Test865 } from './Test865';
export { default as Test881 } from './Test881';
export { default as Test887 } from './Test887';
export { default as Test913 } from './Test913';
export { default as Test999 } from './Test999';
export { default as Test1017 } from './Test1017';
export { default as Test1031 } from './Test1031';
export { default as Test1032 } from './Test1032';
export { default as Test1036 } from './Test1036';
export { default as Test1072 } from './Test1072';
export { default as Test1084 } from './Test1084';
export { default as Test1091 } from './Test1091';
export { default as Test1096 } from './Test1096';
export { default as Test1097 } from './Test1097';
export { default as Test1153 } from './Test1153';
export { default as Test1157 } from './Test1157';
export { default as Test1162 } from './Test1162';
export { default as Test1166 } from './Test1166';
export { default as Test1188 } from './Test1188';
export { default as Test1190 } from './Test1190';
export { default as TestFreeze } from './TestFreeze';
export { default as Test1198 } from './Test1198';
export { default as Test1204 } from './Test1204';
export { default as Test1209 } from './Test1209';
export { default as Test1213 } from './Test1213';
export { default as Test1214 } from './Test1214';
export { default as Test1227 } from './Test1227';
export { default as Test1228 } from './Test1228';
export { default as Test1259 } from './Test1259';
export { default as Test1260 } from './Test1260';
export { default as Test1296 } from './Test1296';
export { default as Test1299 } from './Test1299';
export { default as Test1391 } from './Test1391';
export { default as Test1419 } from './Test1419';
export { default as Test1463 } from './Test1463';
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';
export { default as Test1683 } from './Test1683';
export { default as Test1726 } from './Test1726';
export { default as Test1791 } from './Test1791';
export { default as Test1802 } from './Test1802';
export { default as Test1829 } from './Test1829';
export { default as Test1844 } from './Test1844';
export { default as Test1864 } from './Test1864';
export { default as Test1970 } from './Test1970';
export { default as Test1975 } from './Test1975';
export { default as Test1981 } from './Test1981';
export { default as Test2002 } from './Test2002';
export { default as Test2008 } from './Test2008';
export { default as Test2028 } from './Test2028';
export { default as Test2048 } from './Test2048';
export { default as Test2069 } from './Test2069';
export { default as Test2118 } from './Test2118';
export { default as Test2184 } from './Test2184';
export { default as Test2223 } from './Test2223';
export { default as Test2227 } from './Test2227';
export { default as Test2229 } from './Test2229';
export { default as Test2231 } from './Test2231';
export { default as Test2232 } from './Test2232';
export { default as Test2235 } from './Test2235';
export { default as Test2252 } from './Test2252';
export { default as Test2271 } from './Test2271';
export { default as Test2282 } from './Test2282';
export { default as Test2232 } from './Test2332';
export { default as TestScreenAnimation } from './TestScreenAnimation';
export { default as TestHeader } from './TestHeader';
export { default as TestModalNavigation } from './TestModalNavigation';
// export { default as Test42 } from './Test42';
// 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';
// export { default as Test564 } from './Test564';
// export { default as Test577 } from './Test577';
// export { default as Test593 } from './Test593';
// export { default as Test619 } from './Test619';
// export { default as Test624 } from './Test624';
// export { default as Test640 } from './Test640';
// export { default as Test642 } from './Test642';
// export { default as Test645 } from './Test645';
// export { default as Test648 } from './Test648';
// export { default as Test649 } from './Test649';
// export { default as Test654 } from './Test654';
// export { default as Test658 } from './Test658';
// export { default as Test662 } from './Test662';
// export { default as Test691 } from './Test691';
// export { default as Test702 } from './Test702';
// export { default as Test706 } from './Test706';
// export { default as Test713 } from './Test713';
// export { default as Test726 } from './Test726';
// export { default as Test748 } from './Test748';
// export { default as Test750 } from './Test750';
// export { default as Test758 } from './Test758';
// export { default as Test761 } from './Test761';
// export { default as Test779 } from './Test779';
// export { default as Test780 } from './Test780';
// export { default as Test791 } from './Test791';
// export { default as Test800 } from './Test800';
// export { default as Test817 } from './Test817';
// export { default as Test830 } from './Test830';
// export { default as Test831 } from './Test831';
// export { default as Test844 } from './Test844';
// export { default as Test852 } from './Test852';
// export { default as Test860 } from './Test860';
// export { default as Test861 } from './Test861';
// export { default as Test865 } from './Test865';
// export { default as Test881 } from './Test881';
// export { default as Test887 } from './Test887';
// export { default as Test913 } from './Test913';
// export { default as Test999 } from './Test999';
// export { default as Test1017 } from './Test1017';
// export { default as Test1031 } from './Test1031';
// export { default as Test1032 } from './Test1032';
// export { default as Test1036 } from './Test1036';
// export { default as Test1072 } from './Test1072';
// export { default as Test1084 } from './Test1084';
// export { default as Test1091 } from './Test1091';
// export { default as Test1096 } from './Test1096';
// export { default as Test1097 } from './Test1097';
// export { default as Test1153 } from './Test1153';
// export { default as Test1157 } from './Test1157';
// export { default as Test1162 } from './Test1162';
// export { default as Test1166 } from './Test1166';
// export { default as Test1188 } from './Test1188';
// export { default as Test1190 } from './Test1190';
// export { default as TestFreeze } from './TestFreeze';
// export { default as Test1198 } from './Test1198';
// export { default as Test1204 } from './Test1204';
// export { default as Test1209 } from './Test1209';
// export { default as Test1213 } from './Test1213';
// export { default as Test1214 } from './Test1214';
// export { default as Test1227 } from './Test1227';
// export { default as Test1228 } from './Test1228';
// export { default as Test1259 } from './Test1259';
// export { default as Test1260 } from './Test1260';
// export { default as Test1296 } from './Test1296';
// export { default as Test1299 } from './Test1299';
// export { default as Test1391 } from './Test1391';
// export { default as Test1419 } from './Test1419';
// export { default as Test1463 } from './Test1463';
// 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';
// export { default as Test1683 } from './Test1683';
// export { default as Test1726 } from './Test1726';
// export { default as Test1791 } from './Test1791';
// export { default as Test1802 } from './Test1802';
// export { default as Test1829 } from './Test1829';
// export { default as Test1844 } from './Test1844';
// export { default as Test1864 } from './Test1864';
// export { default as Test1970 } from './Test1970';
// export { default as Test1975 } from './Test1975';
// export { default as Test1981 } from './Test1981';
// export { default as Test2002 } from './Test2002';
// export { default as Test2008 } from './Test2008';
// export { default as Test2028 } from './Test2028';
// export { default as Test2048 } from './Test2048';
// export { default as Test2069 } from './Test2069';
// export { default as Test2118 } from './Test2118';
// export { default as Test2184 } from './Test2184';
// export { default as Test2223 } from './Test2223';
// export { default as Test2227 } from './Test2227';
// export { default as Test2229 } from './Test2229';
// export { default as Test2231 } from './Test2231';
// export { default as Test2232 } from './Test2232';
// export { default as Test2235 } from './Test2235';
// export { default as Test2252 } from './Test2252';
// export { default as Test2271 } from './Test2271';
// export { default as Test2282 } from './Test2282';
// export { default as Test2232 } from './Test2332';
// export { default as TestScreenAnimation } from './TestScreenAnimation';
// export { default as TestHeader } from './TestHeader';
// export { default as TestModalNavigation } from './TestModalNavigation';
export { default as Test2175 } from './Test2175';

Loading

0 comments on commit 2138a88

Please sign in to comment.