Skip to content

Commit 223820b

Browse files
kmichalikkclaude
andauthored
feat(iOS): Enable synchronous screen shadow state updates by default (#3931)
## Description This PR changes the default value for `synchronousScreenUpdatesEnabled` flag to `true` ## Changes Updated default values for the flag in native hierarchy & JS. ## Before & after - visual documentation N/A ## Test plan See #3282 ## Checklist - [ ] Included code example that can be used to test this change. - [ ] For visual changes, included screenshots / GIFs / recordings documenting the change. - [ ] For API changes, updated relevant public types. - [ ] Ensured that CI passes --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
1 parent f597be4 commit 223820b

6 files changed

Lines changed: 5 additions & 7 deletions

File tree

FabricExample/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import App from '../apps';
22
import { featureFlags } from 'react-native-screens';
33

4-
featureFlags.experiment.synchronousScreenUpdatesEnabled = false;
4+
featureFlags.experiment.synchronousScreenUpdatesEnabled = true;
55
featureFlags.experiment.synchronousHeaderConfigUpdatesEnabled = true;
66
featureFlags.experiment.synchronousHeaderSubviewUpdatesEnabled = true;
77
featureFlags.experiment.androidResetScreenShadowStateOnOrientationChangeEnabled =

apps/src/tests/issue-tests/Test2543.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ function FormSheet({ route }: StackNavigationProp) {
8989
</Text>
9090
<View
9191
style={{
92-
flex: 1,
9392
alignItems: 'center',
9493
justifyContent: 'center',
9594
height: 180,
@@ -100,7 +99,6 @@ function FormSheet({ route }: StackNavigationProp) {
10099
</View>
101100
<View
102101
style={{
103-
flex: 1,
104102
alignItems: 'center',
105103
justifyContent: 'center',
106104
height: 180,
@@ -112,7 +110,6 @@ function FormSheet({ route }: StackNavigationProp) {
112110
</View>
113111
<View
114112
style={{
115-
flex: 1,
116113
alignItems: 'center',
117114
justifyContent: 'center',
118115
height: 200,

ios/RNSScreen.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ - (void)initCommonProps
103103
_sheetsScrollView = nil;
104104
_sheetContentHeight = 0.0;
105105
_markedForUnmountInCurrentTransaction = NO;
106+
_synchronousShadowStateUpdatesEnabled = YES;
106107
}
107108

108109
+ (RNSViewInteractionManager *)viewInteractionManagerInstance

src/fabric/ModalScreenNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export interface NativeProps extends ViewProps {
121121
leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
122122
rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
123123
topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
124-
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, false>;
124+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
125125
}
126126

127127
export default codegenNativeComponent<NativeProps>('RNSModalScreen', {

src/fabric/ScreenNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export interface NativeProps extends ViewProps {
121121
leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
122122
rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
123123
topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
124-
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, false>;
124+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
125125
androidResetScreenShadowStateOnOrientationChangeEnabled?: CT.WithDefault<
126126
boolean,
127127
true

src/flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const RNS_SYNCHRONOUS_SCREEN_STATE_UPDATES_DEFAULT = false;
1+
const RNS_SYNCHRONOUS_SCREEN_STATE_UPDATES_DEFAULT = true;
22
const RNS_SYNCHRONOUS_HEADER_CONFIG_STATE_UPDATES_DEFAULT = true;
33
const RNS_SYNCHRONOUS_HEADER_SUBVIEW_STATE_UPDATES_DEFAULT = true;
44
const RNS_ANDROID_LEGACY_TOP_INSET_BEHAVIOR_DEFAULT = false;

0 commit comments

Comments
 (0)