diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 988d8e733a5..a8ec942cae4 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -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 diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 6fae7adf61c..cd3faee14f5 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -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. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 91278ff613f..f4da17f7c19 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -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<> + * @generated SignedSource<> */ /** @@ -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) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 54a921e5664..62b4bcc7dda 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -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 diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 7f504d44b40..8a6b89c0fe7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -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<> */ /** @@ -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 diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 799dedd56ac..996b7bbae63 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -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<> + * @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) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 94f17848a10..16a5a15d486 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -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<> */ /** @@ -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 diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java index 2384a6d276b..2f2e49f8427 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java @@ -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; - } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java index 34d199a1630..aeadd79dfe4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java @@ -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; diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 416e5518118..3b8c965714a 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -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<> + * @generated SignedSource<> */ /** @@ -231,12 +231,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool incorporateMaxLinesDuringAndroidLayout() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("incorporateMaxLinesDuringAndroidLayout"); - return method(javaProvider_); - } - bool traceTurboModulePromiseRejectionsOnAndroid() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("traceTurboModulePromiseRejectionsOnAndroid"); @@ -467,11 +461,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled( return ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled(); } -bool JReactNativeFeatureFlagsCxxInterop::incorporateMaxLinesDuringAndroidLayout( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout(); -} - bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid(); @@ -654,9 +643,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "fuseboxNetworkInspectionEnabled", JReactNativeFeatureFlagsCxxInterop::fuseboxNetworkInspectionEnabled), - makeNativeMethod( - "incorporateMaxLinesDuringAndroidLayout", - JReactNativeFeatureFlagsCxxInterop::incorporateMaxLinesDuringAndroidLayout), makeNativeMethod( "traceTurboModulePromiseRejectionsOnAndroid", JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 136ba527638..c1d179c0075 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -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<> + * @generated SignedSource<<963cdfe340c23ca3ca6e43020a3ab608>> */ /** @@ -126,9 +126,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool fuseboxNetworkInspectionEnabled( facebook::jni::alias_ref); - static bool incorporateMaxLinesDuringAndroidLayout( - facebook::jni::alias_ref); - static bool traceTurboModulePromiseRejectionsOnAndroid( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index b9d5ea2a685..2228537fdd6 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -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<> */ /** @@ -154,10 +154,6 @@ bool ReactNativeFeatureFlags::fuseboxNetworkInspectionEnabled() { return getAccessor().fuseboxNetworkInspectionEnabled(); } -bool ReactNativeFeatureFlags::incorporateMaxLinesDuringAndroidLayout() { - return getAccessor().incorporateMaxLinesDuringAndroidLayout(); -} - bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() { return getAccessor().traceTurboModulePromiseRejectionsOnAndroid(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index e6409b3e71b..2a8d6c3fb5d 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -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. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index c4c53c70411..fe0c4046e2f 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -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<> + * @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; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 078d1ce3882..b31886c3518 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -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 currentProvider_; bool wasOverridden_; - std::array, 44> accessedFeatureFlags_; + std::array, 43> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> animatedShouldSignalBatch_; @@ -121,7 +120,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> fixMappingOfEventPrioritiesBetweenFabricAndReact_; std::atomic> fuseboxEnabledRelease_; std::atomic> fuseboxNetworkInspectionEnabled_; - std::atomic> incorporateMaxLinesDuringAndroidLayout_; std::atomic> traceTurboModulePromiseRejectionsOnAndroid_; std::atomic> updateRuntimeShadowNodeReferencesOnCommit_; std::atomic> useAlwaysAvailableJSErrorHandling_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 0199f7d0846..276eb10aa65 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -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; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index da12339d57e..d514a796b48 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -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<> */ /** @@ -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()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 7fb259ff1ac..fb16c06df7d 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -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<> */ /** @@ -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; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index bdbf7e4ce1a..fafc575d43e 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -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(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index e015331d51a..70550c07595 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -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<> */ /** @@ -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); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 1d9b1afb1a4..48b673c635c 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -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: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 315531b7bd0..778c35c24e1 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -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<> + * @generated SignedSource<<7d8d9fdc5a0a3133890ae00bb7a1436c>> * @flow strict */ @@ -78,7 +78,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter, fuseboxEnabledRelease: Getter, fuseboxNetworkInspectionEnabled: Getter, - incorporateMaxLinesDuringAndroidLayout: Getter, traceTurboModulePromiseRejectionsOnAndroid: Getter, updateRuntimeShadowNodeReferencesOnCommit: Getter, useAlwaysAvailableJSErrorHandling: Getter, @@ -284,10 +283,6 @@ export const fuseboxEnabledRelease: Getter = 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 = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false); -/** - * Set maxLines and ellipsization during Android layout creation - */ -export const incorporateMaxLinesDuringAndroidLayout: Getter = 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. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index dc92dfbfc05..c0ad0301e10 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -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<> + * @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;