Skip to content

Commit f597be4

Browse files
kmichalikkclaude
andauthored
feat(iOS): Enable synchronous header subview shadow state updates by default (#3933)
## Description This PR changes the default value for `synchronousHeaderSubviewUpdatesEnabled` flag to `true` ## Changes Updated flag defaults, native & JS initialization ## 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 4b7072a commit f597be4

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

FabricExample/App.tsx

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

44
featureFlags.experiment.synchronousScreenUpdatesEnabled = false;
55
featureFlags.experiment.synchronousHeaderConfigUpdatesEnabled = true;
6-
featureFlags.experiment.synchronousHeaderSubviewUpdatesEnabled = false;
6+
featureFlags.experiment.synchronousHeaderSubviewUpdatesEnabled = true;
77
featureFlags.experiment.androidResetScreenShadowStateOnOrientationChangeEnabled =
88
true;
99
featureFlags.experiment.iosPreventReattachmentOfDismissedScreens = true;

ios/RNSScreenStackHeaderSubview.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ - (instancetype)initWithFrame:(CGRect)frame
116116
static const auto defaultProps = std::make_shared<const react::RNSScreenStackHeaderSubviewProps>();
117117
_props = defaultProps;
118118
_lastScheduledFrame = CGRectZero;
119+
_synchronousShadowStateUpdatesEnabled = YES;
119120
}
120121

121122
return self;

src/fabric/ScreenStackHeaderSubviewNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type HeaderSubviewTypes =
1414
export interface NativeProps extends ViewProps {
1515
type?: CT.WithDefault<HeaderSubviewTypes, 'left'>;
1616
hidesSharedBackground?: boolean | undefined;
17-
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, false>;
17+
synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
1818
}
1919

2020
export default codegenNativeComponent<NativeProps>(

src/flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const RNS_SYNCHRONOUS_SCREEN_STATE_UPDATES_DEFAULT = false;
22
const RNS_SYNCHRONOUS_HEADER_CONFIG_STATE_UPDATES_DEFAULT = true;
3-
const RNS_SYNCHRONOUS_HEADER_SUBVIEW_STATE_UPDATES_DEFAULT = false;
3+
const RNS_SYNCHRONOUS_HEADER_SUBVIEW_STATE_UPDATES_DEFAULT = true;
44
const RNS_ANDROID_LEGACY_TOP_INSET_BEHAVIOR_DEFAULT = false;
55
const RNS_ANDROID_RESET_SCREEN_SHADOW_STATE_ON_ORIENTATION_CHANGE_DEFAULT =
66
true;

0 commit comments

Comments
 (0)