Skip to content

Commit 4b76129

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Cleanup Text Feature Flags (#51944)
Summary: Pull Request resolved: #51944 Ahead of more refactoring, this cleans up a couple feature flags, already on by default, the newest of which added on 5/1, since these should all be validated by significant production usage at this point, so it is unlikely we would want to turn off. Changelog: [Internal] Reviewed By: javache Differential Revision: D76412970 fbshipit-source-id: a2612583c060ed3f6fc559864e481d5b5a33fef2
1 parent 0dd3f80 commit 4b76129

22 files changed

Lines changed: 85 additions & 625 deletions

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 19 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<<7484b716c0cb8d12d307e3b34767e559>>
7+
* @generated SignedSource<<c55f75461405db6ddf70300f6d3ab95f>>
88
*/
99

1010
/**
@@ -42,12 +42,6 @@ public object ReactNativeFeatureFlags {
4242
@JvmStatic
4343
public fun animatedShouldSignalBatch(): Boolean = accessor.animatedShouldSignalBatch()
4444

45-
/**
46-
* Do not incorrectly ceil the available width of an Android text layout
47-
*/
48-
@JvmStatic
49-
public fun avoidCeilingAvailableAndroidTextWidth(): Boolean = accessor.avoidCeilingAvailableAndroidTextWidth()
50-
5145
/**
5246
* Use a C++ implementation of Native Animated instead of the platform implementation.
5347
*/
@@ -276,12 +270,6 @@ public object ReactNativeFeatureFlags {
276270
@JvmStatic
277271
public fun fuseboxNetworkInspectionEnabled(): Boolean = accessor.fuseboxNetworkInspectionEnabled()
278272

279-
/**
280-
* Set maxLines and ellipsization during Android layout creation
281-
*/
282-
@JvmStatic
283-
public fun incorporateMaxLinesDuringAndroidLayout(): Boolean = accessor.incorporateMaxLinesDuringAndroidLayout()
284-
285273
/**
286274
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
287275
*/
@@ -300,12 +288,6 @@ public object ReactNativeFeatureFlags {
300288
@JvmStatic
301289
public fun useAlwaysAvailableJSErrorHandling(): Boolean = accessor.useAlwaysAvailableJSErrorHandling()
302290

303-
/**
304-
* Trust the width of a text layout we create, instead of re-deriving it from its contents
305-
*/
306-
@JvmStatic
307-
public fun useAndroidTextLayoutWidthDirectly(): Boolean = accessor.useAndroidTextLayoutWidthDirectly()
308-
309291
/**
310292
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
311293
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 31 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<<daf78f5249ed27828d8e2fb83d5e5df3>>
7+
* @generated SignedSource<<3f804ca3979ab34210911c54f9d64e1d>>
88
*/
99

1010
/**
@@ -22,7 +22,6 @@ package com.facebook.react.internal.featureflags
2222
internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccessor {
2323
private var commonTestFlagCache: Boolean? = null
2424
private var animatedShouldSignalBatchCache: Boolean? = null
25-
private var avoidCeilingAvailableAndroidTextWidthCache: Boolean? = null
2625
private var cxxNativeAnimatedEnabledCache: Boolean? = null
2726
private var disableMainQueueSyncDispatchIOSCache: Boolean? = null
2827
private var disableMountItemReorderingAndroidCache: Boolean? = null
@@ -61,11 +60,9 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
6160
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
6261
private var fuseboxEnabledReleaseCache: Boolean? = null
6362
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
64-
private var incorporateMaxLinesDuringAndroidLayoutCache: Boolean? = null
6563
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
6664
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
6765
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
68-
private var useAndroidTextLayoutWidthDirectlyCache: Boolean? = null
6966
private var useFabricInteropCache: Boolean? = null
7067
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
7168
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
@@ -93,15 +90,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
9390
return cached
9491
}
9592

96-
override fun avoidCeilingAvailableAndroidTextWidth(): Boolean {
97-
var cached = avoidCeilingAvailableAndroidTextWidthCache
98-
if (cached == null) {
99-
cached = ReactNativeFeatureFlagsCxxInterop.avoidCeilingAvailableAndroidTextWidth()
100-
avoidCeilingAvailableAndroidTextWidthCache = cached
101-
}
102-
return cached
103-
}
104-
10593
override fun cxxNativeAnimatedEnabled(): Boolean {
10694
var cached = cxxNativeAnimatedEnabledCache
10795
if (cached == null) {
@@ -444,15 +432,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
444432
return cached
445433
}
446434

447-
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean {
448-
var cached = incorporateMaxLinesDuringAndroidLayoutCache
449-
if (cached == null) {
450-
cached = ReactNativeFeatureFlagsCxxInterop.incorporateMaxLinesDuringAndroidLayout()
451-
incorporateMaxLinesDuringAndroidLayoutCache = cached
452-
}
453-
return cached
454-
}
455-
456435
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
457436
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
458437
if (cached == null) {
@@ -480,15 +459,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
480459
return cached
481460
}
482461

483-
override fun useAndroidTextLayoutWidthDirectly(): Boolean {
484-
var cached = useAndroidTextLayoutWidthDirectlyCache
485-
if (cached == null) {
486-
cached = ReactNativeFeatureFlagsCxxInterop.useAndroidTextLayoutWidthDirectly()
487-
useAndroidTextLayoutWidthDirectlyCache = cached
488-
}
489-
return cached
490-
}
491-
492462
override fun useFabricInterop(): Boolean {
493463
var cached = useFabricInteropCache
494464
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

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<<1261be706a0da435a217a88faed53015>>
7+
* @generated SignedSource<<b09f539c2d08d29bd37210dbad99d8fb>>
88
*/
99

1010
/**
@@ -32,8 +32,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
3232

3333
@DoNotStrip @JvmStatic public external fun animatedShouldSignalBatch(): Boolean
3434

35-
@DoNotStrip @JvmStatic public external fun avoidCeilingAvailableAndroidTextWidth(): Boolean
36-
3735
@DoNotStrip @JvmStatic public external fun cxxNativeAnimatedEnabled(): Boolean
3836

3937
@DoNotStrip @JvmStatic public external fun disableMainQueueSyncDispatchIOS(): Boolean
@@ -110,16 +108,12 @@ public object ReactNativeFeatureFlagsCxxInterop {
110108

111109
@DoNotStrip @JvmStatic public external fun fuseboxNetworkInspectionEnabled(): Boolean
112110

113-
@DoNotStrip @JvmStatic public external fun incorporateMaxLinesDuringAndroidLayout(): Boolean
114-
115111
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
116112

117113
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
118114

119115
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
120116

121-
@DoNotStrip @JvmStatic public external fun useAndroidTextLayoutWidthDirectly(): Boolean
122-
123117
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
124118

125119
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

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<<e3792f1be08a9175b71c3bef175fbb71>>
7+
* @generated SignedSource<<afd0aeeeb2e96544ce5e7503fb521f18>>
88
*/
99

1010
/**
@@ -27,8 +27,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
2727

2828
override fun animatedShouldSignalBatch(): Boolean = false
2929

30-
override fun avoidCeilingAvailableAndroidTextWidth(): Boolean = true
31-
3230
override fun cxxNativeAnimatedEnabled(): Boolean = false
3331

3432
override fun disableMainQueueSyncDispatchIOS(): Boolean = false
@@ -105,16 +103,12 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
105103

106104
override fun fuseboxNetworkInspectionEnabled(): Boolean = false
107105

108-
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean = true
109-
110106
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
111107

112108
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
113109

114110
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
115111

116-
override fun useAndroidTextLayoutWidthDirectly(): Boolean = true
117-
118112
override fun useFabricInterop(): Boolean = true
119113

120114
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 34 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<<aba6b250d4c48029ae96480724c16ed0>>
7+
* @generated SignedSource<<de7404e8c49c6279804f5137ea90ee65>>
88
*/
99

1010
/**
@@ -26,7 +26,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
2626

2727
private var commonTestFlagCache: Boolean? = null
2828
private var animatedShouldSignalBatchCache: Boolean? = null
29-
private var avoidCeilingAvailableAndroidTextWidthCache: Boolean? = null
3029
private var cxxNativeAnimatedEnabledCache: Boolean? = null
3130
private var disableMainQueueSyncDispatchIOSCache: Boolean? = null
3231
private var disableMountItemReorderingAndroidCache: Boolean? = null
@@ -65,11 +64,9 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
6564
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
6665
private var fuseboxEnabledReleaseCache: Boolean? = null
6766
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
68-
private var incorporateMaxLinesDuringAndroidLayoutCache: Boolean? = null
6967
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
7068
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
7169
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
72-
private var useAndroidTextLayoutWidthDirectlyCache: Boolean? = null
7370
private var useFabricInteropCache: Boolean? = null
7471
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
7572
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
@@ -99,16 +96,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
9996
return cached
10097
}
10198

102-
override fun avoidCeilingAvailableAndroidTextWidth(): Boolean {
103-
var cached = avoidCeilingAvailableAndroidTextWidthCache
104-
if (cached == null) {
105-
cached = currentProvider.avoidCeilingAvailableAndroidTextWidth()
106-
accessedFeatureFlags.add("avoidCeilingAvailableAndroidTextWidth")
107-
avoidCeilingAvailableAndroidTextWidthCache = cached
108-
}
109-
return cached
110-
}
111-
11299
override fun cxxNativeAnimatedEnabled(): Boolean {
113100
var cached = cxxNativeAnimatedEnabledCache
114101
if (cached == null) {
@@ -489,16 +476,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
489476
return cached
490477
}
491478

492-
override fun incorporateMaxLinesDuringAndroidLayout(): Boolean {
493-
var cached = incorporateMaxLinesDuringAndroidLayoutCache
494-
if (cached == null) {
495-
cached = currentProvider.incorporateMaxLinesDuringAndroidLayout()
496-
accessedFeatureFlags.add("incorporateMaxLinesDuringAndroidLayout")
497-
incorporateMaxLinesDuringAndroidLayoutCache = cached
498-
}
499-
return cached
500-
}
501-
502479
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
503480
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
504481
if (cached == null) {
@@ -529,16 +506,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
529506
return cached
530507
}
531508

532-
override fun useAndroidTextLayoutWidthDirectly(): Boolean {
533-
var cached = useAndroidTextLayoutWidthDirectlyCache
534-
if (cached == null) {
535-
cached = currentProvider.useAndroidTextLayoutWidthDirectly()
536-
accessedFeatureFlags.add("useAndroidTextLayoutWidthDirectly")
537-
useAndroidTextLayoutWidthDirectlyCache = cached
538-
}
539-
return cached
540-
}
541-
542509
override fun useFabricInterop(): Boolean {
543510
var cached = useFabricInteropCache
544511
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

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<<3f2600dc760fa878ded68e0e15110904>>
7+
* @generated SignedSource<<df546f9681034c05ba8641fdea0e9d29>>
88
*/
99

1010
/**
@@ -27,8 +27,6 @@ public interface ReactNativeFeatureFlagsProvider {
2727

2828
@DoNotStrip public fun animatedShouldSignalBatch(): Boolean
2929

30-
@DoNotStrip public fun avoidCeilingAvailableAndroidTextWidth(): Boolean
31-
3230
@DoNotStrip public fun cxxNativeAnimatedEnabled(): Boolean
3331

3432
@DoNotStrip public fun disableMainQueueSyncDispatchIOS(): Boolean
@@ -105,16 +103,12 @@ public interface ReactNativeFeatureFlagsProvider {
105103

106104
@DoNotStrip public fun fuseboxNetworkInspectionEnabled(): Boolean
107105

108-
@DoNotStrip public fun incorporateMaxLinesDuringAndroidLayout(): Boolean
109-
110106
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
111107

112108
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
113109

114110
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
115111

116-
@DoNotStrip public fun useAndroidTextLayoutWidthDirectly(): Boolean
117-
118112
@DoNotStrip public fun useFabricInterop(): Boolean
119113

120114
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean

0 commit comments

Comments
 (0)