From 4aecb2c8684cb0222ad18c3b012a35ceb621dfa0 Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Thu, 12 Oct 2023 14:02:57 -0700 Subject: [PATCH] Revert "Temporary hotfix for broken view flattening on Android" Summary: We no longer need this hotfix since the native fix has been stable for some time now. Cleans up the feature flags and forced `collapsable={false}` prop in View. ## Changelog [General][Internal] Differential Revision: D50241092 --- .../react-native/Libraries/Components/View/View.js | 11 ----------- .../Libraries/ReactNative/ReactNativeFeatureFlags.js | 4 ---- 2 files changed, 15 deletions(-) diff --git a/packages/react-native/Libraries/Components/View/View.js b/packages/react-native/Libraries/Components/View/View.js index 4a9e0c91261e17..c4d2fc63ada85f 100644 --- a/packages/react-native/Libraries/Components/View/View.js +++ b/packages/react-native/Libraries/Components/View/View.js @@ -10,7 +10,6 @@ import type {ViewProps} from './ViewPropTypes'; -import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags'; import flattenStyle from '../../StyleSheet/flattenStyle'; import TextAncestor from '../../Text/TextAncestor'; import ViewNativeComponent from './ViewNativeComponent'; @@ -102,20 +101,10 @@ const View: React.AbstractComponent< // $FlowFixMe[sketchy-null-mixed] const newPointerEvents = style?.pointerEvents || pointerEvents; - const collapsableOverride = - ReactNativeFeatureFlags.shouldForceUnflattenForElevation() - ? { - collapsable: - style != null && style.elevation != null && style.elevation !== 0 - ? false - : otherProps.collapsable, - } - : {}; const actualView = ( boolean, - /** - * Enables a hotfix for forcing materialization of views with elevation set. - */ - shouldForceUnflattenForElevation: () => boolean, |}; const ReactNativeFeatureFlags: FeatureFlags = {