Skip to content

Commit 77c1eb6

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Migrate VirtualView to Feature Flags (facebook#51233)
Summary: Pull Request resolved: facebook#51233 Migrates internal operational and experimental feature flags to React Native's feature flag system, in order to simplify integration of other infrastructure features (e.g. Fantom). Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D74534921 fbshipit-source-id: 1559cba4f208a554bb043a203f331062036c60de
1 parent 996be87 commit 77c1eb6

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,27 @@ const definitions: FeatureFlagDefinitions = {
610610
},
611611
ossReleaseStage: 'none',
612612
},
613+
enableVirtualViewDebugFeatures: {
614+
defaultValue: false,
615+
metadata: {
616+
description:
617+
'Enables VirtualView debug features such as logging and overlays.',
618+
expectedReleaseValue: false,
619+
purpose: 'operational',
620+
},
621+
ossReleaseStage: 'none',
622+
},
623+
enableVirtualViewDoubleStateHidden: {
624+
defaultValue: false,
625+
metadata: {
626+
dateAdded: '2025-05-10',
627+
description:
628+
'Enables a VirtualView workaround that triggers a second state update when changing to hidden mode.',
629+
expectedReleaseValue: false,
630+
purpose: 'experimentation',
631+
},
632+
ossReleaseStage: 'none',
633+
},
613634
fixVirtualizeListCollapseWindowSize: {
614635
defaultValue: false,
615636
metadata: {

packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<73bd98850713966c32d122c3d3283df9>>
7+
* @generated SignedSource<<24076ce2a95804d6dda128740cbbae8f>>
88
* @flow strict
99
*/
1010

@@ -33,6 +33,8 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
3333
avoidStateUpdateInAnimatedPropsMemo: Getter<boolean>,
3434
disableInteractionManager: Getter<boolean>,
3535
enableAccessToHostTreeInFabric: Getter<boolean>,
36+
enableVirtualViewDebugFeatures: Getter<boolean>,
37+
enableVirtualViewDoubleStateHidden: Getter<boolean>,
3638
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
3739
isLayoutAnimationEnabled: Getter<boolean>,
3840
scheduleAnimatedCleanupInMicrotask: Getter<boolean>,
@@ -127,6 +129,16 @@ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGe
127129
*/
128130
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
129131

132+
/**
133+
* Enables VirtualView debug features such as logging and overlays.
134+
*/
135+
export const enableVirtualViewDebugFeatures: Getter<boolean> = createJavaScriptFlagGetter('enableVirtualViewDebugFeatures', false);
136+
137+
/**
138+
* Enables a VirtualView workaround that triggers a second state update when changing to hidden mode.
139+
*/
140+
export const enableVirtualViewDoubleStateHidden: Getter<boolean> = createJavaScriptFlagGetter('enableVirtualViewDoubleStateHidden', false);
141+
130142
/**
131143
* Fixing an edge case where the current window size is not properly calculated with fast scrolling. Window size collapsed to 1 element even if windowSize more than the current amount of elements
132144
*/

0 commit comments

Comments
 (0)