Skip to content

Commit

Permalink
Remove experimental_ and cleanup mixBlendMode experiment (facebook#…
Browse files Browse the repository at this point in the history
…46650)

Summary:
Pull Request resolved: facebook#46650

tsia

Changelog: [General] [Added] - Removed `experimental` prefix and fully released `mixBlendMode` prop

Reviewed By: joevilches

Differential Revision: D63407473
  • Loading branch information
jorge-cab authored and facebook-github-bot committed Sep 29, 2024
1 parent 513e966 commit 47b12cc
Show file tree
Hide file tree
Showing 30 changed files with 91 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
/**
* MixBlendMode
*/
experimental_mixBlendMode: true,
mixBlendMode: true,

/**
* Isolation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const validAttributesForNonEventProps = {
filter: {
process: require('../StyleSheet/processFilter').default,
},
experimental_mixBlendMode: true,
mixBlendMode: true,
isolation: true,
opacity: true,
elevation: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const validAttributesForNonEventProps = {
boxShadow: {
process: require('../StyleSheet/processBoxShadow').default,
},
experimental_mixBlendMode: true,
mixBlendMode: true,
isolation: true,

borderTopWidth: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
cursor?: CursorValue,
boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
filter?: $ReadOnlyArray<FilterFunction> | string,
experimental_mixBlendMode?: ____BlendMode_Internal,
mixBlendMode?: ____BlendMode_Internal,
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
isolation?: 'auto' | 'isolate',
}>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8108,7 +8108,7 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
cursor?: CursorValue,
boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
filter?: $ReadOnlyArray<FilterFunction> | string,
experimental_mixBlendMode?: ____BlendMode_Internal,
mixBlendMode?: ____BlendMode_Internal,
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
isolation?: \\"auto\\" | \\"isolate\\",
}>;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ - (void)updateAccessibilityTraitsForRole:(RCTView *)view withDefaultView:(RCTVie
// filtered by view configs.
}

RCT_CUSTOM_VIEW_PROPERTY(experimental_mixBlendMode, NSString *, RCTView)
RCT_CUSTOM_VIEW_PROPERTY(mixBlendMode, NSString *, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
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<<bce0548a9e58299746c75aad95a25275>>
* @generated SignedSource<<70e68165b567734a2609b77656b2c183>>
*/

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

/**
* Enables mix-blend-mode prop on Android.
*/
@JvmStatic
public fun enableAndroidMixBlendModeProp(): Boolean = accessor.enableAndroidMixBlendModeProp()

/**
* Use BackgroundStyleApplicator in place of other background/border drawing code
*/
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<<19dca512d93d689e927ee5988a43e646>>
* @generated SignedSource<<2f8da8585f1ac040bd26953263b08392>>
*/

/**
Expand All @@ -27,7 +27,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
private var enableAndroidLineHeightCenteringCache: Boolean? = null
private var enableAndroidMixBlendModePropCache: Boolean? = null
private var enableBackgroundStyleApplicatorCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
Expand Down Expand Up @@ -138,15 +137,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

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

override fun enableBackgroundStyleApplicator(): Boolean {
var cached = enableBackgroundStyleApplicatorCache
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<<76eebf045692e945d39a4ea27a63ae02>>
* @generated SignedSource<<4055cd2fa9070549fba3eda675e8d6f6>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): 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<<8155a9c1309145fefdb19feb33c241db>>
* @generated SignedSource<<340a2b27d0a0281746e3f4b02be5e1bb>>
*/

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

override fun enableAndroidLineHeightCentering(): Boolean = false

override fun enableAndroidMixBlendModeProp(): Boolean = false

override fun enableBackgroundStyleApplicator(): Boolean = true

override fun enableBridgelessArchitecture(): Boolean = false
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<<5e4e474b62996caec15bbf8af9622a0a>>
* @generated SignedSource<<bb25a0d771f0f129ab3f224640053ac3>>
*/

/**
Expand All @@ -31,7 +31,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
private var enableAlignItemsBaselineOnFabricIOSCache: Boolean? = null
private var enableAndroidLineHeightCenteringCache: Boolean? = null
private var enableAndroidMixBlendModePropCache: Boolean? = null
private var enableBackgroundStyleApplicatorCache: Boolean? = null
private var enableBridgelessArchitectureCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
Expand Down Expand Up @@ -149,16 +148,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableBackgroundStyleApplicator(): Boolean {
var cached = enableBackgroundStyleApplicatorCache
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<<97eddbbd75ff7cfd0f1c905d72e9eafd>>
* @generated SignedSource<<509b61021c01bf47c54724bc9ba81c9c>>
*/

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

@DoNotStrip public fun enableAndroidLineHeightCentering(): Boolean

@DoNotStrip public fun enableAndroidMixBlendModeProp(): Boolean

@DoNotStrip public fun enableBackgroundStyleApplicator(): Boolean

@DoNotStrip public fun enableBridgelessArchitecture(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public object ViewProps {
public const val ON_LAYOUT: String = "onLayout"
public const val BOX_SHADOW: String = "boxShadow"
public const val FILTER: String = "filter"
public const val MIX_BLEND_MODE: String = "experimental_mixBlendMode"
public const val MIX_BLEND_MODE: String = "mixBlendMode"
public const val OUTLINE_COLOR: String = "outlineColor"
public const val OUTLINE_OFFSET: String = "outlineOffset"
public const val OUTLINE_STYLE: String = "outlineStyle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.common.annotations.VisibleForTesting;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
import com.facebook.react.touch.OnInterceptTouchEventListener;
import com.facebook.react.touch.ReactHitSlopView;
import com.facebook.react.touch.ReactInterceptingViewGroup;
Expand Down Expand Up @@ -784,10 +783,6 @@ private void removeFromArray(int index) {
}

private boolean needsIsolatedLayer() {
if (!ReactNativeFeatureFlags.enableAndroidMixBlendModeProp()) {
return false;
}

for (int i = 0; i < getChildCount(); i++) {
if (getChildAt(i).getTag(R.id.mix_blend_mode) != null) {
return 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<<383e9749c506bc2326455ef907e06a4c>>
* @generated SignedSource<<8b39b99e91976d5bf63956e6501e180f>>
*/

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

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

bool enableBackgroundStyleApplicator() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBackgroundStyleApplicator");
Expand Down Expand Up @@ -402,11 +396,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering(
return ReactNativeFeatureFlags::enableAndroidLineHeightCentering();
}

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

bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableBackgroundStyleApplicator();
Expand Down Expand Up @@ -675,9 +664,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableAndroidLineHeightCentering",
JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering),
makeNativeMethod(
"enableAndroidMixBlendModeProp",
JReactNativeFeatureFlagsCxxInterop::enableAndroidMixBlendModeProp),
makeNativeMethod(
"enableBackgroundStyleApplicator",
JReactNativeFeatureFlagsCxxInterop::enableBackgroundStyleApplicator),
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<<293ed423f770e7e0ba95b19eb5c28dc2>>
* @generated SignedSource<<896ca4611f7fa5de92279fbbf2095e3e>>
*/

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

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

static bool enableBackgroundStyleApplicator(
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<<85cdb5a41317e9671cc23b2c7345c04d>>
* @generated SignedSource<<6e2b92ee7e4fb51de5286792004f649d>>
*/

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

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

bool ReactNativeFeatureFlags::enableBackgroundStyleApplicator() {
return getAccessor().enableBackgroundStyleApplicator();
}
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<<ea2c2d19e83630b549e719057cd1982e>>
* @generated SignedSource<<646023269f07d6ae792b8aad5ef2d3c1>>
*/

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

/**
* Enables mix-blend-mode prop on Android.
*/
RN_EXPORT static bool enableAndroidMixBlendModeProp();

/**
* Use BackgroundStyleApplicator in place of other background/border drawing code
*/
Expand Down
Loading

0 comments on commit 47b12cc

Please sign in to comment.