Skip to content

Commit 661ce06

Browse files
generatedunixname1608173377072046meta-codesync[bot]
authored andcommitted
Remove stale disableMaintainVisibleContentPosition feature flag (#56727)
Summary: Pull Request resolved: #56727 Pull Request resolved: #56725 Remove the stale `disableMaintainVisibleContentPosition` feature flag which was never rolled out (defaultValue: false, expectedReleaseValue: false). This flag was intended to disable the `maintainVisibleContentPosition` prop in ScrollView but was never enabled. Changes: - Remove the feature flag definition from ReactNativeFeatureFlags - Simplify ScrollView.js by removing the unnecessary destructuring of `maintainVisibleContentPosition` (now passed through via otherProps spread) - Remove related generated code ## Changelog: [General][Removed] - Removed the unused `disableMaintainVisibleContentPosition` feature flag from ReactNativeFeatureFlags Reviewed By: javache, cortinico Differential Revision: D104378114 fbshipit-source-id: 62587caf1aec86010751697217d24cc58cfa0abd
1 parent 745b749 commit 661ce06

3 files changed

Lines changed: 3 additions & 28 deletions

File tree

packages/react-native/Libraries/Components/ScrollView/ScrollView.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
VScrollContentViewNativeComponent,
3232
VScrollViewNativeComponent,
3333
} from '../../../src/private/components/scrollview/VScrollViewNativeComponents';
34-
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
3534
import AnimatedImplementation from '../../Animated/AnimatedImplementation';
3635
import FrameRateLogger from '../../Interaction/FrameRateLogger';
3736
import {findNodeHandle} from '../../ReactNative/RendererProxy';
@@ -1762,11 +1761,8 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
17621761

17631762
const baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical;
17641763

1765-
const {
1766-
experimental_endDraggingSensitivityMultiplier,
1767-
maintainVisibleContentPosition,
1768-
...otherProps
1769-
} = this.props;
1764+
const {experimental_endDraggingSensitivityMultiplier, ...otherProps} =
1765+
this.props;
17701766
const props = {
17711767
...otherProps,
17721768
alwaysBounceHorizontal,
@@ -1819,10 +1815,6 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
18191815
this.props.snapToInterval != null ||
18201816
this.props.snapToOffsets != null,
18211817
}),
1822-
maintainVisibleContentPosition:
1823-
ReactNativeFeatureFlags.disableMaintainVisibleContentPosition()
1824-
? undefined
1825-
: this.props.maintainVisibleContentPosition,
18261818
};
18271819

18281820
const {decelerationRate} = this.props;

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,17 +1065,6 @@ const definitions: FeatureFlagDefinitions = {
10651065
},
10661066
ossReleaseStage: 'none',
10671067
},
1068-
disableMaintainVisibleContentPosition: {
1069-
defaultValue: false,
1070-
metadata: {
1071-
dateAdded: '2025-08-26',
1072-
description:
1073-
'Disable prop maintainVisibleContentPosition in ScrollView',
1074-
expectedReleaseValue: false,
1075-
purpose: 'experimentation',
1076-
},
1077-
ossReleaseStage: 'none',
1078-
},
10791068
enableNativeEventTargetEventDispatching: {
10801069
defaultValue: false,
10811070
metadata: {

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

Lines changed: 1 addition & 7 deletions
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<<ec712f5528e1e06486a9c471baba631b>>
7+
* @generated SignedSource<<72c610dc5a8efc1eba2121949e1c24a0>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -32,7 +32,6 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
3232
animatedShouldDebounceQueueFlush: Getter<boolean>,
3333
animatedShouldUseSingleOp: Getter<boolean>,
3434
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
35-
disableMaintainVisibleContentPosition: Getter<boolean>,
3635
enableNativeEventTargetEventDispatching: Getter<boolean>,
3736
externalElementInspectionEnabled: Getter<boolean>,
3837
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
@@ -161,11 +160,6 @@ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGe
161160
*/
162161
export const deferFlatListFocusChangeRenderUpdate: Getter<boolean> = createJavaScriptFlagGetter('deferFlatListFocusChangeRenderUpdate', false);
163162

164-
/**
165-
* Disable prop maintainVisibleContentPosition in ScrollView
166-
*/
167-
export const disableMaintainVisibleContentPosition: Getter<boolean> = createJavaScriptFlagGetter('disableMaintainVisibleContentPosition', false);
168-
169163
/**
170164
* When enabled, the React Native renderer dispatches events through the W3C EventTarget API (addEventListener/dispatchEvent) instead of the legacy plugin-based system.
171165
*/

0 commit comments

Comments
 (0)