Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3a6a61e2cc2bf01a35ab5c3919462ad5>>
* @generated SignedSource<<b1f1c6e750ba7f823b191b4c986473f7>>
*/

/**
Expand Down Expand Up @@ -438,6 +438,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun fixTextLayoutOnPixelDensityChange(): Boolean = accessor.fixTextLayoutOnPixelDensityChange()

/**
* Enables scroll-position stability improvements for variable-height VirtualizedLists, including spacer-length stabilization, improved native maintainVisibleContentPosition anchoring, and default anchoring.
*/
@JvmStatic
public fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean = accessor.fixVirtualizedListMaintainVisibleContentPosition()

/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<fe927f4acf804e05b74dbe606e39746f>>
* @generated SignedSource<<bb41f9b4f3338293bc666d14989b81a7>>
*/

/**
Expand Down Expand Up @@ -88,6 +88,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fixProgrammaticScrollMomentumEventsIOSCache: Boolean? = null
private var fixTextInlineViewLineHeightCache: Boolean? = null
private var fixTextLayoutOnPixelDensityChangeCache: Boolean? = null
private var fixVirtualizedListMaintainVisibleContentPositionCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
Expand Down Expand Up @@ -737,6 +738,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean {
var cached = fixVirtualizedListMaintainVisibleContentPositionCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.fixVirtualizedListMaintainVisibleContentPosition()
fixVirtualizedListMaintainVisibleContentPositionCache = cached
}
return cached
}

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b58702a0f594f409c0d20fd497395fde>>
* @generated SignedSource<<1de551d73a93d8ed040a94001f3be38f>>
*/

/**
Expand Down Expand Up @@ -164,6 +164,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun fixTextLayoutOnPixelDensityChange(): Boolean

@DoNotStrip @JvmStatic public external fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean

@DoNotStrip @JvmStatic public external fun fixYogaFlexBasisFitContentInMainAxis(): Boolean

@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<834b0e9533cbc775a1c12b86140d718d>>
* @generated SignedSource<<d7aac6d10bacf4ae01b6cda76f50af6e>>
*/

/**
Expand Down Expand Up @@ -159,6 +159,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun fixTextLayoutOnPixelDensityChange(): Boolean = false

override fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean = false

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false

override fun fuseboxAssertSingleHostState(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<15c65d4497fd9f36f8902efb2812b3b2>>
* @generated SignedSource<<7c3d27e67b1f0f10589322c38357e654>>
*/

/**
Expand Down Expand Up @@ -92,6 +92,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fixProgrammaticScrollMomentumEventsIOSCache: Boolean? = null
private var fixTextInlineViewLineHeightCache: Boolean? = null
private var fixTextLayoutOnPixelDensityChangeCache: Boolean? = null
private var fixVirtualizedListMaintainVisibleContentPositionCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
Expand Down Expand Up @@ -809,6 +810,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean {
var cached = fixVirtualizedListMaintainVisibleContentPositionCache
if (cached == null) {
cached = currentProvider.fixVirtualizedListMaintainVisibleContentPosition()
accessedFeatureFlags.add("fixVirtualizedListMaintainVisibleContentPosition")
fixVirtualizedListMaintainVisibleContentPositionCache = cached
}
return cached
}

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<89f683cb28a7d1ef52c86faa96f1107c>>
* @generated SignedSource<<75454445ce65bfa4e0d02f942c73bb0c>>
*/

/**
Expand Down Expand Up @@ -159,6 +159,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun fixTextLayoutOnPixelDensityChange(): Boolean

@DoNotStrip public fun fixVirtualizedListMaintainVisibleContentPosition(): Boolean

@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean

@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<407c8e5915db07bb6cc2b9ba4449750a>>
* @generated SignedSource<<32abe9d6748826e5326718f6a89048bb>>
*/

/**
Expand Down Expand Up @@ -447,6 +447,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool fixVirtualizedListMaintainVisibleContentPosition() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixVirtualizedListMaintainVisibleContentPosition");
return method(javaProvider_);
}

bool fixYogaFlexBasisFitContentInMainAxis() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixYogaFlexBasisFitContentInMainAxis");
Expand Down Expand Up @@ -1007,6 +1013,11 @@ bool JReactNativeFeatureFlagsCxxInterop::fixTextLayoutOnPixelDensityChange(
return ReactNativeFeatureFlags::fixTextLayoutOnPixelDensityChange();
}

bool JReactNativeFeatureFlagsCxxInterop::fixVirtualizedListMaintainVisibleContentPosition(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixVirtualizedListMaintainVisibleContentPosition();
}

bool JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
Expand Down Expand Up @@ -1422,6 +1433,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fixTextLayoutOnPixelDensityChange",
JReactNativeFeatureFlagsCxxInterop::fixTextLayoutOnPixelDensityChange),
makeNativeMethod(
"fixVirtualizedListMaintainVisibleContentPosition",
JReactNativeFeatureFlagsCxxInterop::fixVirtualizedListMaintainVisibleContentPosition),
makeNativeMethod(
"fixYogaFlexBasisFitContentInMainAxis",
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7cb5d49e9124d56b3e242e2023db8649>>
* @generated SignedSource<<a05795da454207248cc427ae667da908>>
*/

/**
Expand Down Expand Up @@ -234,6 +234,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool fixTextLayoutOnPixelDensityChange(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool fixVirtualizedListMaintainVisibleContentPosition(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<cdff9d8521366a5ab71b9cacd2415c83>>
* @generated SignedSource<<da65e10dfe6f0b007fd2652e5944c8f0>>
*/

/**
Expand Down Expand Up @@ -298,6 +298,10 @@ bool ReactNativeFeatureFlags::fixTextLayoutOnPixelDensityChange() {
return getAccessor().fixTextLayoutOnPixelDensityChange();
}

bool ReactNativeFeatureFlags::fixVirtualizedListMaintainVisibleContentPosition() {
return getAccessor().fixVirtualizedListMaintainVisibleContentPosition();
}

bool ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis() {
return getAccessor().fixYogaFlexBasisFitContentInMainAxis();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2ddd9296377ea4c1fd9c84883fbde049>>
* @generated SignedSource<<899da3bc401e78edf7cd397b1e62a61c>>
*/

/**
Expand Down Expand Up @@ -381,6 +381,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool fixTextLayoutOnPixelDensityChange();

/**
* Enables scroll-position stability improvements for variable-height VirtualizedLists, including spacer-length stabilization, improved native maintainVisibleContentPosition anchoring, and default anchoring.
*/
RN_EXPORT static bool fixVirtualizedListMaintainVisibleContentPosition();

/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
Expand Down
Loading
Loading