Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
4032945
Animate a hard-coded clone
bartlomiejbloniarz Apr 16, 2025
5e6b09a
Multiple transitions
bartlomiejbloniarz Apr 23, 2025
91d6f00
use LightNodes
bartlomiejbloniarz Apr 24, 2025
6f2a8b6
oops
bartlomiejbloniarz Apr 24, 2025
9e216a3
opacity hacks
bartlomiejbloniarz Apr 24, 2025
f9a3be0
Add scroll offset logic
bartlomiejbloniarz Apr 25, 2025
4419730
remove android logs
bartlomiejbloniarz Apr 25, 2025
98e43c0
Bring back set examples
bartlomiejbloniarz Apr 28, 2025
d81a573
Working animation update
bartlomiejbloniarz Apr 28, 2025
1be557f
kinda working animation restart
bartlomiejbloniarz Apr 28, 2025
77453f7
Bring back profiles and progressTransition examples
bartlomiejbloniarz Apr 30, 2025
7ce9046
Remove status bar from progressTransition example
bartlomiejbloniarz Apr 30, 2025
296b7f5
kacper example
bartlomiejbloniarz May 5, 2025
93703fb
index tez
bartlomiejbloniarz May 5, 2025
0fb993f
Add patch for RNScreens
bartlomiejbloniarz Jul 30, 2025
b33b360
Progress transition poc
bartlomiejbloniarz Jul 30, 2025
1ea37cc
Cleanup transition types
bartlomiejbloniarz Jul 31, 2025
e5191ce
Stabilize progress transitions
bartlomiejbloniarz Jul 31, 2025
c2512fa
Set up transition progress listener on android
bartlomiejbloniarz Aug 1, 2025
ef90d47
Temporary fix for text in android
bartlomiejbloniarz Aug 8, 2025
314a409
Temporary fix restore state
bartlomiejbloniarz Aug 8, 2025
f4b9960
Fix android wrong screen
bartlomiejbloniarz Aug 8, 2025
1f90914
Make back button work on iOS
bartlomiejbloniarz Aug 8, 2025
bef0571
Bring back layout animations
bartlomiejbloniarz Sep 2, 2025
51fc9e5
Android
bartlomiejbloniarz Sep 3, 2025
cd663a5
fix move layout animations
bartlomiejbloniarz Sep 3, 2025
45cb12e
Fix nested
bartlomiejbloniarz Sep 12, 2025
bbfe8cb
Fix restart
bartlomiejbloniarz Sep 12, 2025
4d1400f
lock
bartlomiejbloniarz Sep 12, 2025
25ea9e7
Merge branch 'main' into @bartlomiejbloniarz/sets
bartlomiejbloniarz Sep 12, 2025
04c99c5
patch screens
bartlomiejbloniarz Sep 12, 2025
54f9882
fix progress
bartlomiejbloniarz Sep 12, 2025
ee9718b
Change how we obtain the scrollviewstate
bartlomiejbloniarz Sep 12, 2025
6ee1fc6
[SET] Add PropDiffer (#7654)
piaskowyk Sep 12, 2025
4b4eed2
[SET] Merge parent transforms (#7665)
piaskowyk Sep 16, 2025
ed99c83
oopsie
bartlomiejbloniarz Sep 16, 2025
f94356a
set up initial transform in transition container
bartlomiejbloniarz Sep 16, 2025
86c07b7
Mark which examples should work
bartlomiejbloniarz Sep 16, 2025
bbf9f3c
Allow header back button to trigger progress transition
bartlomiejbloniarz Sep 16, 2025
ea94c0f
Fix borderWidth default
bartlomiejbloniarz Sep 25, 2025
c93fb08
Mark nested stack as fixed
bartlomiejbloniarz Sep 25, 2025
f90cfd5
fix for missing props in created containers
bartlomiejbloniarz Sep 26, 2025
976a8e4
oopsie
bartlomiejbloniarz Sep 26, 2025
c009661
Fix Profiles blinking on android
bartlomiejbloniarz Sep 26, 2025
587779a
oopsie
bartlomiejbloniarz Sep 26, 2025
6cecaf3
Profiles flicker ios
bartlomiejbloniarz Sep 26, 2025
ef77854
Mark examples
bartlomiejbloniarz Sep 26, 2025
f765d34
format
bartlomiejbloniarz Sep 26, 2025
6e4517c
purge logs
bartlomiejbloniarz Sep 29, 2025
e25842d
cleanup 1
bartlomiejbloniarz Sep 29, 2025
7a27152
Reorder
bartlomiejbloniarz Sep 29, 2025
6bb2426
add throw error
bartlomiejbloniarz Sep 29, 2025
a233a99
cleanup 2
bartlomiejbloniarz Sep 29, 2025
c584dc5
cleanup 3
bartlomiejbloniarz Sep 29, 2025
7226bb5
simplify transforms
bartlomiejbloniarz Sep 30, 2025
6230fdb
cleanup
bartlomiejbloniarz Sep 30, 2025
a426c49
transition containr update
bartlomiejbloniarz Sep 30, 2025
36178c8
cleanup
bartlomiejbloniarz Sep 30, 2025
f400626
extract container creation
bartlomiejbloniarz Sep 30, 2025
c00c387
cleanup progress transition
bartlomiejbloniarz Sep 30, 2025
5814584
cleanup
bartlomiejbloniarz Sep 30, 2025
8f0d82c
cleanup
bartlomiejbloniarz Oct 14, 2025
2551984
Fix for iOS snapshot
bartlomiejbloniarz Oct 15, 2025
c8f58aa
fix flicker
bartlomiejbloniarz Oct 16, 2025
de4c717
Fix jumps on layout animation start
bartlomiejbloniarz Oct 16, 2025
2ddf1fa
Merge branch 'main' into @bartlomiejbloniarz/sets
bartlomiejbloniarz Oct 16, 2025
b2ea86a
oopsie
bartlomiejbloniarz Oct 16, 2025
7102201
introduce feature flag
bartlomiejbloniarz Oct 17, 2025
27a0603
couldnt build release
bartlomiejbloniarz Oct 17, 2025
f830249
bump screens
bartlomiejbloniarz Oct 17, 2025
0eef1ae
Merge branch 'main' into @bartlomiejbloniarz/sets
bartlomiejbloniarz Oct 17, 2025
9083d62
Better nativeId parsing
bartlomiejbloniarz Oct 31, 2025
cf6f06a
Add dynamic set configuration
bartlomiejbloniarz Oct 31, 2025
f9f1940
many screens works!
bartlomiejbloniarz Oct 31, 2025
ef600f2
export SharedTransition
bartlomiejbloniarz Oct 31, 2025
659cede
import photo
bartlomiejbloniarz Oct 31, 2025
8930f85
Merge branch 'main' into @bartlomiejbloniarz/sets
bartlomiejbloniarz Oct 31, 2025
55352c9
Merge branch 'main' into @bartlomiejbloniarz/sets
bartlomiejbloniarz Nov 3, 2025
112455b
fix sync props feature flags
bartlomiejbloniarz Nov 3, 2025
14b72bc
Bigger container tags 🙈
bartlomiejbloniarz Nov 3, 2025
e56ac9f
I guess we updated screens
bartlomiejbloniarz Nov 3, 2025
41c27d7
fix const
bartlomiejbloniarz Nov 3, 2025
666566c
format
bartlomiejbloniarz Nov 3, 2025
981b2fb
lint
bartlomiejbloniarz Nov 3, 2025
6a3cee9
include
bartlomiejbloniarz Nov 3, 2025
44238e3
check screens include
bartlomiejbloniarz Nov 3, 2025
fd5d7da
format
bartlomiejbloniarz Nov 3, 2025
d706d15
Swap requires for imports
bartlomiejbloniarz Nov 3, 2025
cf7d9cc
bring back navigation state
bartlomiejbloniarz Nov 3, 2025
4793857
New rnsscreens patch
bartlomiejbloniarz Nov 4, 2025
81c85f6
lock
bartlomiejbloniarz Nov 4, 2025
bb2af95
Fix empty example
bartlomiejbloniarz Nov 4, 2025
5fcb0c9
fix xcscheme
bartlomiejbloniarz Nov 4, 2025
9b0fb36
Remove logs from `animationsManager.ts`
bartlomiejbloniarz Nov 4, 2025
2a1e10a
Remove legacy transforms logic
bartlomiejbloniarz Nov 4, 2025
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
54 changes: 54 additions & 0 deletions .yarn/patches/react-native-screens-npm-4.17.1-25d7ca5c4d.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
diff --git a/ios/RNSScreen.h b/ios/RNSScreen.h
index 6b0c87abb74c9c70d39813b71b989a889c92408f..c0bbf0d08adc91333f6fcab82daf4eb6be8a9954 100644
--- a/ios/RNSScreen.h
+++ b/ios/RNSScreen.h
@@ -53,7 +53,7 @@ namespace react = facebook::react;
- (void)notifyFinishTransitioning;
- (RNSScreenView *)screenView;
#ifdef RCT_NEW_ARCH_ENABLED
-- (void)setViewToSnapshot;
+- (void)setViewToSnapshotAfterUpdates:(BOOL)afterUpdates;
- (CGFloat)calculateHeaderHeightIsModal:(BOOL)isModal;
#endif

@@ -130,6 +130,7 @@ namespace react = facebook::react;
@property (nonatomic, readonly) BOOL hasHeaderConfig;
@property (nonatomic, readonly, getter=isMarkedForUnmountInCurrentTransaction)
BOOL markedForUnmountInCurrentTransaction;
+@property (nonatomic) BOOL snapshotAfterUpdates;
#else
@property (nonatomic, copy) RCTDirectEventBlock onAppear;
@property (nonatomic, copy) RCTDirectEventBlock onDisappear;
diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm
index 65c18f1ddccc64b3169e050e577eab77fd8c183b..e8779d92d400e614e850ccc0627510a8b85cb5dc 100644
--- a/ios/RNSScreen.mm
+++ b/ios/RNSScreen.mm
@@ -2139,12 +2139,12 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
#ifdef RCT_NEW_ARCH_ENABLED
#pragma mark - Fabric specific

-- (void)setViewToSnapshot
+- (void)setViewToSnapshotAfterUpdates:(BOOL)afterUpdates
{
UIView *superView = self.view.superview;
// if we dismissed the view natively, it will already be detached from view hierarchy
if (self.view.window != nil) {
- UIView *snapshot = [self.view snapshotViewAfterScreenUpdates:NO];
+ UIView *snapshot = [self.view snapshotViewAfterScreenUpdates:afterUpdates];
snapshot.frame = self.view.frame;
[self.view removeFromSuperview];
self.view = snapshot;
diff --git a/ios/RNSScreenStack.mm b/ios/RNSScreenStack.mm
index 51f021831aed26a4eed3c85014020423b7b3108b..db0e68204ad8579822fabc5969c594e44c67c4ed 100644
--- a/ios/RNSScreenStack.mm
+++ b/ios/RNSScreenStack.mm
@@ -1393,7 +1393,8 @@ RNS_IGNORE_SUPER_CALL_END
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
{
RNSScreenView *screenChildComponent = (RNSScreenView *)childComponentView;
- [screenChildComponent.controller setViewToSnapshot];
+ BOOL afterUpdates = screenChildComponent.snapshotAfterUpdates;
+ [screenChildComponent.controller setViewToSnapshotAfterUpdates:afterUpdates];

RCTAssert(
screenChildComponent.reactSuperview == self,
2 changes: 1 addition & 1 deletion apps/common-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"react-native-pager-view": "7.0.0",
"react-native-reanimated": "workspace:*",
"react-native-safe-area-context": "5.6.1",
"react-native-screens": "4.16.0",
"react-native-screens": "patch:react-native-screens@npm%3A4.17.1#~/.yarn/patches/react-native-screens-npm-4.17.1-25d7ca5c4d.patch",
"react-native-svg": "15.14.0",
"react-native-worklets": "workspace:*",
"react-strict-dom": "0.0.54"
Expand Down
21 changes: 20 additions & 1 deletion apps/common-app/src/apps/reanimated/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function findExamples(search: string) {
function HomeScreen({ navigation }: HomeScreenProps) {
const [search, setSearch] = React.useState('');
const [wasClicked, setWasClicked] = React.useState<string[]>([]);
const platform = Platform.OS as 'ios' | 'android';

React.useLayoutEffect(() => {
navigation.setOptions({
Expand Down Expand Up @@ -78,6 +79,7 @@ function HomeScreen({ navigation }: HomeScreenProps) {
setTimeout(() => setWasClicked([...wasClicked, name]), 500);
}
}}
shouldWork={EXAMPLES[name].shouldWork?.[platform]}
disabled={EXAMPLES[name].disabledPlatforms?.includes(Platform.OS)}
wasClicked={wasClicked.includes(name)}
/>
Expand All @@ -95,9 +97,17 @@ interface ItemProps {
disabled?: boolean;
onPress: () => void;
wasClicked?: boolean;
shouldWork?: boolean;
}

function Item({ icon, title, onPress, disabled, wasClicked }: ItemProps) {
function Item({
icon,
title,
onPress,
disabled,
wasClicked,
shouldWork,
}: ItemProps) {
const Button = IS_MACOS ? Pressable : RectButton;
return (
<Button
Expand All @@ -110,6 +120,9 @@ function Item({ icon, title, onPress, disabled, wasClicked }: ItemProps) {
enabled={!disabled}>
{icon && <Text style={styles.title}>{icon + ' '}</Text>}
<Text style={styles.title}>{title}</Text>
{shouldWork !== undefined && (
<Text style={styles.marker}>{shouldWork ? '✅' : '❌'}</Text>
)}
</Button>
);
}
Expand Down Expand Up @@ -190,6 +203,12 @@ const styles = StyleSheet.create({
fontSize: 16,
color: 'black',
},
marker: {
fontSize: 20,
color: 'black',
alignSelf: 'flex-end',
marginLeft: 'auto',
},
visitedItem: {
backgroundColor: '#e6f0f7',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import type { ParamListBase } from '@react-navigation/native';
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import * as React from 'react';
import { Button, StyleSheet, View } from 'react-native';
import Animated, { SharedTransition } from 'react-native-reanimated';
import photo from './assets/image.jpg';

const Stack = createNativeStackNavigator();

const transition = undefined;

// SharedTransition.duration(1000).defaultTransitionType(
// SharedTransitionType.ANIMATION
// );

function Screen1({ navigation }: NativeStackScreenProps<ParamListBase>) {
return (
<View style={styles.flexOne}>
<Button
onPress={() => navigation.navigate('Screen2')}
title="go to screen2"
/>

<Animated.View
style={styles.greenBoxScreenOne}
sharedTransitionTag="tag"
sharedTransitionStyle={transition}>
<Animated.Image
style={styles.imageOne}
sharedTransitionTag="image"
sharedTransitionStyle={transition}
source={photo}
/>
</Animated.View>
</View>
);
}

function Screen2({ navigation }: NativeStackScreenProps<ParamListBase>) {
return (
<View style={styles.flexOne}>
<Button title="go back" onPress={() => navigation.popTo('Screen1')} />
<Animated.View
style={styles.greenBoxScreenTwo}
sharedTransitionTag="tag"
sharedTransitionStyle={transition}>
<Animated.Image
style={styles.imageTwo}
sharedTransitionTag="image"
sharedTransitionStyle={transition}
source={photo}
/>
</Animated.View>
</View>
);
}

export default function CustomTransitionExample() {
return (
<Stack.Navigator>
<Stack.Screen
name="Screen1"
component={Screen1}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Screen2"
component={Screen2}
options={{ headerShown: false }}
/>
</Stack.Navigator>
);
}

const styles = StyleSheet.create({
flexOne: { flex: 1, justifyContent: 'flex-end', alignItems: 'center' },
greenBoxScreenOne: {
width: 300,
height: 150,
borderTopLeftRadius: 25,
borderTopRightRadius: 25,
backgroundColor: 'pink',
},
greenBoxScreenTwo: {
width: 350,
height: 500,
marginBottom: 100,
borderRadius: 50,
backgroundColor: 'pink',
},
imageOne: {
margin: 10,
width: 280,
height: 140,
borderTopLeftRadius: 15,
borderTopRightRadius: 15,
},
imageTwo: {
margin: 10,
width: 330,
height: 200,
borderRadius: 40,
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
import type {
NativeStackNavigationProp,
NativeStackScreenProps,
} from '@react-navigation/native-stack';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import * as React from 'react';
import {
Pressable,
StyleSheet,
TouchableNativeFeedback,
View,
} from 'react-native';
import Animated from 'react-native-reanimated';
import photo from './assets/image.jpg';

type ParamList = {
Screen1?: object;
Screen2: {
title: string;
sharedTransitionTag: string;
};
};

const Stack = createNativeStackNavigator<ParamList>();

interface CardProps {
navigation: NativeStackNavigationProp<ParamList>;
title: string;
transitionTag: string;
isOpen?: boolean;
nextScreen: keyof ParamList;
}

function Card({
navigation,
title,
transitionTag,
isOpen = false,
nextScreen,
}: CardProps) {
const goNext = (screenName: keyof ParamList) => {
navigation.navigate(screenName, {
title,
sharedTransitionTag: transitionTag,
});
};

return (
<Pressable
onPress={() => {
goNext(nextScreen);
}}>
<Animated.View
style={isOpen ? styles.open : styles.closed}
sharedTransitionTag={transitionTag + '1'}>
<Animated.Text
sharedTransitionTag={transitionTag + '2'}
style={styles.text}>
{title}
</Animated.Text>
<Animated.Image
sharedTransitionTag={transitionTag + '3'}
source={photo}
style={[styles.fullWidth, { height: isOpen ? 300 : 100 }]}
/>
<Animated.Text
sharedTransitionTag={transitionTag + '4'}
style={[styles.fullWidth, { height: isOpen ? 100 : 0 }]}>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quas aliquid,
earum non, dignissimos fugit rerum exercitationem ab consequatur,
error animi veritatis delectus. Nostrum sapiente distinctio possimus
vel nam facilis ut?
</Animated.Text>
</Animated.View>
</Pressable>
);
}

function Screen1({ navigation }: NativeStackScreenProps<ParamList, 'Screen1'>) {
return (
<Animated.ScrollView style={styles.flexOne}>
{[...Array(6)].map((_, i) => (
<Card
key={i}
navigation={navigation}
title={'Title' + i}
transitionTag={'tag' + i}
nextScreen="Screen2"
/>
))}
</Animated.ScrollView>
);
}

function Screen2({
route,
navigation,
}: NativeStackScreenProps<ParamList, 'Screen2'>) {
const { title, sharedTransitionTag } = route.params;

return (
<View style={styles.flexOne}>
<Card
navigation={navigation}
title={title}
transitionTag={sharedTransitionTag}
isOpen={true}
nextScreen="Screen1"
/>
</View>
);
}

export default function CardExample() {
return (
<Stack.Navigator
screenOptions={
{
// animation: 'none',
}
}>
<Stack.Screen
name="Screen1"
component={Screen1}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Screen2"
component={Screen2}
options={{ headerShown: true }}
/>
</Stack.Navigator>
);
}
const styles = StyleSheet.create({
flexOne: {
flex: 1,
},
open: {
height: 500,
marginTop: 50,
backgroundColor: 'green',
},
closed: {
height: 120,
marginTop: 20,
backgroundColor: 'green',
},
text: {
width: '100%',
height: 20,
},
fullWidth: {
width: '100%',
},
});
Loading
Loading