Back out "Incorporate maxLines and ellipsization into text layout" (#51035)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51035

This is causing some problems with older versions of Android. Let's back out for now.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73950625

fbshipit-source-id: 424dfc1216ae811e1e287774c6ac5d0c9ba5aa17
This commit is contained in:
Nick Gerleman authored and Facebook GitHub Bot committed 2025-04-30 17:45:25 -07:00
1 parent 4d8eeb34f9
commit 025f2d931e
23 files changed
+32 -197

No files matched your search

@@ -6514,7 +6514,6 @@ public class com/facebook/react/views/text/TextAttributeProps {
public fun getEffectiveFontSize ()I
public fun getEffectiveLetterSpacing ()F
public fun getEffectiveLineHeight ()F
public static fun getEllipsizeMode (Ljava/lang/String;)Landroid/text/TextUtils$TruncateAt;
public fun getFontFamily ()Ljava/lang/String;
public fun getFontFeatureSettings ()Ljava/lang/String;
public fun getFontStyle ()I
@@ -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<<1172f5f2fda3a7d7835f619376f65b3a>>
* @generated SignedSource<<519e6095d6c91fbbb4225a066c9cbe26>>
*/
/**
@@ -222,12 +222,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun fuseboxNetworkInspectionEnabled(): Boolean = accessor.fuseboxNetworkInspectionEnabled()
/**
* Set maxLines and ellipsization during Android layout creation
*/
@JvmStatic
public fun incorporateMaxLinesDuringAndroidLayout(): Boolean = accessor.incorporateMaxLinesDuringAndroidLayout()
/**
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
*/
@@ -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<<b045498e0c54e6c12cdf6a6dc25fd109>>
* @generated SignedSource<<a70b3ffda510a41144b061036d4f1d48>>
*/
/**
@@ -52,7 +52,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var incorporateMaxLinesDuringAndroidLayoutCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
@@ -353,15 +352,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean {
var cached = incorporateMaxLinesDuringAndroidLayoutCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.incorporateMaxLinesDuringAndroidLayout()
incorporateMaxLinesDuringAndroidLayoutCache = cached
}
return cached
}
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
if (cached == null) {
@@ -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<<007721988dfdf572f8ac218744341e60>>
* @generated SignedSource<<6107b2e4611a6cd6ad67420eee468601>>
*/
/**
@@ -92,8 +92,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun fuseboxNetworkInspectionEnabled(): Boolean
@DoNotStrip @JvmStatic public external fun incorporateMaxLinesDuringAndroidLayout(): Boolean
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
@@ -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<<6b10c147b3f1753448f599ae4fb43387>>
* @generated SignedSource<<ad976c46e40f6d8a945041388865ec60>>
*/
/**
@@ -87,8 +87,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun fuseboxNetworkInspectionEnabled(): Boolean = false
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean = true
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
@@ -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<<b64966fc245f53645726747ec93a15d1>>
* @generated SignedSource<<580a0bc36f98e9680387089a9740bba8>>
*/
/**
@@ -56,7 +56,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
private var incorporateMaxLinesDuringAndroidLayoutCache: Boolean? = null
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
@@ -389,16 +388,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean {
var cached = incorporateMaxLinesDuringAndroidLayoutCache
if (cached == null) {
cached = currentProvider.incorporateMaxLinesDuringAndroidLayout()
accessedFeatureFlags.add("incorporateMaxLinesDuringAndroidLayout")
incorporateMaxLinesDuringAndroidLayoutCache = cached
}
return cached
}
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
if (cached == null) {
@@ -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<<1e9beb93c98a0a82d030b7a3ea1cf7e4>>
* @generated SignedSource<<b4a944a07650cf46f90d86419b11bbee>>
*/
/**
@@ -87,8 +87,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun fuseboxNetworkInspectionEnabled(): Boolean
@DoNotStrip public fun incorporateMaxLinesDuringAndroidLayout(): Boolean
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
@@ -788,24 +788,4 @@ public class TextAttributeProps {
}
return androidHyphenationFrequency;
}
public static @Nullable TextUtils.TruncateAt getEllipsizeMode(@Nullable String ellipsizeMode) {
@Nullable TextUtils.TruncateAt truncateAt = TextUtils.TruncateAt.START;
if (ellipsizeMode != null) {
switch (ellipsizeMode) {
case "head":
truncateAt = TextUtils.TruncateAt.START;
break;
case "middle":
truncateAt = TextUtils.TruncateAt.MIDDLE;
break;
case "tail":
truncateAt = TextUtils.TruncateAt.END;
break;
case "clip":
truncateAt = null;
}
}
return truncateAt;
}
}
@@ -19,7 +19,6 @@ import android.text.Spanned;
import android.text.StaticLayout;
import android.text.TextDirectionHeuristics;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.LayoutDirection;
import android.view.Gravity;
import android.view.View;
@@ -33,7 +32,6 @@ import com.facebook.react.bridge.WritableArray;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.build.ReactBuildConfig;
import com.facebook.react.common.mapbuffer.MapBuffer;
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
import com.facebook.react.uimanager.PixelUtil;
import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole;
import com.facebook.react.uimanager.ReactAccessibilityDelegate.Role;
@@ -387,8 +385,6 @@ public class TextLayoutManager {
int hyphenationFrequency,
Layout.Alignment alignment,
int justificationMode,
@Nullable TextUtils.TruncateAt ellipsizeMode,
int maxNumberOfLines,
TextPaint paint) {
Layout layout;
@@ -418,11 +414,6 @@ public class TextLayoutManager {
.setTextDirection(
isScriptRTL ? TextDirectionHeuristics.RTL : TextDirectionHeuristics.LTR);
if (ReactNativeFeatureFlags.incorporateMaxLinesDuringAndroidLayout()
&& maxNumberOfLines != ReactConstants.UNSET) {
builder.setEllipsize(ellipsizeMode).setMaxLines(maxNumberOfLines);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
builder.setUseLineSpacingFromFallbacks(true);
}
@@ -456,11 +447,6 @@ public class TextLayoutManager {
.setTextDirection(
isScriptRTL ? TextDirectionHeuristics.RTL : TextDirectionHeuristics.LTR);
if (ReactNativeFeatureFlags.incorporateMaxLinesDuringAndroidLayout()
&& maxNumberOfLines != ReactConstants.UNSET) {
builder.setEllipsize(ellipsizeMode).setMaxLines(maxNumberOfLines);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
builder.setJustificationMode(justificationMode);
}
@@ -550,12 +536,6 @@ public class TextLayoutManager {
paragraphAttributes.contains(PA_KEY_MAX_NUMBER_OF_LINES)
? paragraphAttributes.getInt(PA_KEY_MAX_NUMBER_OF_LINES)
: ReactConstants.UNSET;
@Nullable
TextUtils.TruncateAt ellipsizeMode =
paragraphAttributes.contains(PA_KEY_ELLIPSIZE_MODE)
? TextAttributeProps.getEllipsizeMode(
paragraphAttributes.getString(PA_KEY_ELLIPSIZE_MODE))
: null;
@Nullable String alignmentAttr = getTextAlignmentAttr(attributedString);
Layout.Alignment alignment = getTextAlignment(attributedString, text, alignmentAttr);
@@ -593,8 +573,6 @@ public class TextLayoutManager {
hyphenationFrequency,
alignment,
justificationMode,
ellipsizeMode,
maximumNumberOfLines,
paint);
}
@@ -624,8 +602,6 @@ public class TextLayoutManager {
hyphenationFrequency,
alignment,
justificationMode,
null,
ReactConstants.UNSET,
paint);
// Minimum font size is 4pts to match the iOS implementation.
@@ -678,8 +654,6 @@ public class TextLayoutManager {
hyphenationFrequency,
alignment,
justificationMode,
null,
ReactConstants.UNSET,
paint);
}
}
@@ -703,7 +677,7 @@ public class TextLayoutManager {
width,
height,
reactTextViewManagerCallback);
Spanned text = (Spanned) layout.getText();
Spannable text = (Spannable) layout.getText();
if (text == null) {
return 0;
@@ -752,8 +726,6 @@ public class TextLayoutManager {
float calculatedHeight = height;
if (heightYogaMeasureMode != YogaMeasureMode.EXACTLY) {
// StaticLayout only seems to change its height in response to maxLines when ellipsizing, so
// we must truncate
calculatedHeight = layout.getLineBottom(calculatedLineCount - 1);
if (heightYogaMeasureMode == YogaMeasureMode.AT_MOST && calculatedHeight > height) {
calculatedHeight = height;
@@ -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<<ac6b60d9d2062eda500e291fb2167076>>
* @generated SignedSource<<b07fb300852699f3066090549af0b994>>
*/
/**
@@ -231,12 +231,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool incorporateMaxLinesDuringAndroidLayout() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("incorporateMaxLinesDuringAndroidLayout");
return method(javaProvider_);
}
bool traceTurboModulePromiseRejectionsOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("traceTurboModulePromiseRejectionsOnAndroid");
@@ -467,11 +461,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled(
return ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled();
}
bool JReactNativeFeatureFlagsCxxInterop::incorporateMaxLinesDuringAndroidLayout(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout();
}
bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
@@ -654,9 +643,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fuseboxNetworkInspectionEnabled",
JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled),
makeNativeMethod(
"incorporateMaxLinesDuringAndroidLayout",
JReactNativeFeatureFlagsCxxInterop::incorporateMaxLinesDuringAndroidLayout),
makeNativeMethod(
"traceTurboModulePromiseRejectionsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
@@ -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<<e1f86665fe4df2f2ee9fb82261760a69>>
* @generated SignedSource<<963cdfe340c23ca3ca6e43020a3ab608>>
*/
/**
@@ -126,9 +126,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool fuseboxNetworkInspectionEnabled(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool incorporateMaxLinesDuringAndroidLayout(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool traceTurboModulePromiseRejectionsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -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<<17feaf7e1ce72109e0f99902ac8ad1e2>>
* @generated SignedSource<<da8e7e537e16a1338c7a56b1d17b2c6e>>
*/
/**
@@ -154,10 +154,6 @@ bool ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled() {
return getAccessor().fuseboxNetworkInspectionEnabled();
}
bool ReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout() {
return getAccessor().incorporateMaxLinesDuringAndroidLayout();
}
bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
}
@@ -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<<28265b23648f7634587376b9f0320f7b>>
* @generated SignedSource<<43fcd5c23c1eb9b91d3bc26d5543a4b7>>
*/
/**
@@ -199,11 +199,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool fuseboxNetworkInspectionEnabled();
/**
* Set maxLines and ellipsization during Android layout creation
*/
RN_EXPORT static bool incorporateMaxLinesDuringAndroidLayout();
/**
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
*/
@@ -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<<da4f2f13d1cf90e63e65365a5f5a92e4>>
* @generated SignedSource<<18b19e4eef226bc502f31d36ada48a53>>
*/
/**
@@ -605,24 +605,6 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::incorporateMaxLinesDuringAndroidLayout() {
auto flagValue = incorporateMaxLinesDuringAndroidLayout_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "incorporateMaxLinesDuringAndroidLayout");
flagValue = currentProvider_->incorporateMaxLinesDuringAndroidLayout();
incorporateMaxLinesDuringAndroidLayout_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid() {
auto flagValue = traceTurboModulePromiseRejectionsOnAndroid_.load();
@@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(33, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(32, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(34, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(33, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(34, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -686,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(36, "useEditTextStockAndroidFocusBehavior");
markFlagAsAccessed(35, "useEditTextStockAndroidFocusBehavior");
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
useEditTextStockAndroidFocusBehavior_ = flagValue;
@@ -704,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(37, "useFabricInterop");
markFlagAsAccessed(36, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(37, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(39, "useOptimizedEventBatchingOnAndroid");
markFlagAsAccessed(38, "useOptimizedEventBatchingOnAndroid");
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(40, "useRawPropsJsiValue");
markFlagAsAccessed(39, "useRawPropsJsiValue");
flagValue = currentProvider_->useRawPropsJsiValue();
useRawPropsJsiValue_ = flagValue;
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "useShadowNodeStateOnClone");
markFlagAsAccessed(40, "useShadowNodeStateOnClone");
flagValue = currentProvider_->useShadowNodeStateOnClone();
useShadowNodeStateOnClone_ = flagValue;
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "useTurboModuleInterop");
markFlagAsAccessed(41, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(43, "useTurboModules");
markFlagAsAccessed(42, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -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<<0267ee6a1b8f1beae0860d132dd2402d>>
* @generated SignedSource<<4be34538399efc2c7190f35b57d99aec>>
*/
/**
@@ -64,7 +64,6 @@ class ReactNativeFeatureFlagsAccessor {
bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
bool fuseboxEnabledRelease();
bool fuseboxNetworkInspectionEnabled();
bool incorporateMaxLinesDuringAndroidLayout();
bool traceTurboModulePromiseRejectionsOnAndroid();
bool updateRuntimeShadowNodeReferencesOnCommit();
bool useAlwaysAvailableJSErrorHandling();
@@ -87,7 +86,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 44> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> animatedShouldSignalBatch_;
@@ -121,7 +120,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> fixMappingOfEventPrioritiesBetweenFabricAndReact_;
std::atomic<std::optional<bool>> fuseboxEnabledRelease_;
std::atomic<std::optional<bool>> fuseboxNetworkInspectionEnabled_;
std::atomic<std::optional<bool>> incorporateMaxLinesDuringAndroidLayout_;
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
@@ -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<<78ca4b2bee31ff4813301019618fcc11>>
* @generated SignedSource<<82cdae47f241f17524ce1b4cbaf5d7e2>>
*/
/**
@@ -155,10 +155,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool incorporateMaxLinesDuringAndroidLayout() override {
return true;
}
bool traceTurboModulePromiseRejectionsOnAndroid() override {
return false;
}
@@ -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<<314d2aad3f4449406d3a9f78135424d8>>
* @generated SignedSource<<f9749a9af3dff2d030ff401915f46ece>>
*/
/**
@@ -333,15 +333,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::fuseboxNetworkInspectionEnabled();
}
bool incorporateMaxLinesDuringAndroidLayout() override {
auto value = values_["incorporateMaxLinesDuringAndroidLayout"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::incorporateMaxLinesDuringAndroidLayout();
}
bool traceTurboModulePromiseRejectionsOnAndroid() override {
auto value = values_["traceTurboModulePromiseRejectionsOnAndroid"];
if (!value.isNull()) {
@@ -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<<3328b8a878572bb64517a8320a5c1fac>>
* @generated SignedSource<<cbd205716995b7d53e0426d821cf381e>>
*/
/**
@@ -57,7 +57,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0;
virtual bool fuseboxEnabledRelease() = 0;
virtual bool fuseboxNetworkInspectionEnabled() = 0;
virtual bool incorporateMaxLinesDuringAndroidLayout() = 0;
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
virtual bool useAlwaysAvailableJSErrorHandling() = 0;
@@ -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<<9f00c0fc715cca4ea3fc6f7fe0b288c7>>
* @generated SignedSource<<7aa76d7bbd51de2cc1e3da0ac88e7b56>>
*/
/**
@@ -204,11 +204,6 @@ bool NativeReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(
return ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled();
}
bool NativeReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout();
}
bool NativeReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
@@ -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<<9620cd29be36a46d4a80fdfb0600970d>>
* @generated SignedSource<<b5b7e8a4b0eb26b5ceea212700ae6efe>>
*/
/**
@@ -101,8 +101,6 @@ class NativeReactNativeFeatureFlags
bool fuseboxNetworkInspectionEnabled(jsi::Runtime& runtime);
bool incorporateMaxLinesDuringAndroidLayout(jsi::Runtime& runtime);
bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime& runtime);
bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime& runtime);
@@ -385,16 +385,6 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
incorporateMaxLinesDuringAndroidLayout: {
defaultValue: true,
metadata: {
description:
'Set maxLines and ellipsization during Android layout creation',
expectedReleaseValue: true,
purpose: 'release',
},
ossReleaseStage: 'stable',
},
traceTurboModulePromiseRejectionsOnAndroid: {
defaultValue: false,
metadata: {
@@ -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<<ed6d94dd3369073c3dba6eba354101e2>>
* @generated SignedSource<<7d8d9fdc5a0a3133890ae00bb7a1436c>>
* @flow strict
*/
@@ -78,7 +78,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
fuseboxEnabledRelease: Getter<boolean>,
fuseboxNetworkInspectionEnabled: Getter<boolean>,
incorporateMaxLinesDuringAndroidLayout: Getter<boolean>,
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
@@ -284,10 +283,6 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
* Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
*/
export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
/**
* Set maxLines and ellipsization during Android layout creation
*/
export const incorporateMaxLinesDuringAndroidLayout: Getter<boolean> = createNativeFlagGetter('incorporateMaxLinesDuringAndroidLayout', true);
/**
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
*/
@@ -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<<c95c93d2845a0b4555b8da4ede06fa43>>
* @generated SignedSource<<7e9029f654b8454e5d0f878d3196341b>>
* @flow strict
*/
@@ -56,7 +56,6 @@ export interface Spec extends TurboModule {
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
+fuseboxEnabledRelease?: () => boolean;
+fuseboxNetworkInspectionEnabled?: () => boolean;
+incorporateMaxLinesDuringAndroidLayout?: () => boolean;
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
+useAlwaysAvailableJSErrorHandling?: () => boolean;