Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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<<94a1d6bbc5595c495a2c54851a9c5b5b>>
* @generated SignedSource<<a03d363d13ff18dd87d15dc223c9c32d>>
*/

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

/**
* iOS only. When true (default), shadow nodes carrying ShadowNodeTraits::Trait::Hidden are filtered out of the mounting slice. When false, those nodes stay in the slice and are hidden via UIView.hidden = YES in updateLayoutMetrics:.
*/
@JvmStatic
public fun useTraitHiddenOnIOS(): Boolean = accessor.useTraitHiddenOnIOS()

/**
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
*/
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<<4e19cdce9383c287c849b912fa74586c>>
* @generated SignedSource<<b3ddcd5c53e3fec3c0397dbeaa2a3b0c>>
*/

/**
Expand Down Expand Up @@ -81,6 +81,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var useRawPropsJsiValueCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useSilenceErrorSMMViewNotFoundCache: Boolean? = null
private var useTraitHiddenOnIOSCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
private var virtualViewPrerenderRatioCache: Double? = null
Expand Down Expand Up @@ -635,6 +636,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun useTurboModuleInterop(): Boolean {
var cached = useTurboModuleInteropCache
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<<2a525ef08b04eb1c244badb8cc865e4d>>
* @generated SignedSource<<1234d5c7c6bb64451618817387318d13>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun useTurboModules(): 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<<58b3101bd16b63268440523cdee7ae93>>
* @generated SignedSource<<3255db6cb7c71d866991568dc632321f>>
*/

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

override fun useSilenceErrorSMMViewNotFound(): Boolean = false

override fun useTraitHiddenOnIOS(): Boolean = true

override fun useTurboModuleInterop(): Boolean = false

override fun useTurboModules(): 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<<3c639d5edf52fc3feee65388b5ac3ed7>>
* @generated SignedSource<<6f23f8fd399adf79814bb8f2edc29841>>
*/

/**
Expand Down Expand Up @@ -85,6 +85,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var useRawPropsJsiValueCache: Boolean? = null
private var useShadowNodeStateOnCloneCache: Boolean? = null
private var useSilenceErrorSMMViewNotFoundCache: Boolean? = null
private var useTraitHiddenOnIOSCache: Boolean? = null
private var useTurboModuleInteropCache: Boolean? = null
private var useTurboModulesCache: Boolean? = null
private var virtualViewPrerenderRatioCache: Double? = null
Expand Down Expand Up @@ -700,6 +701,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun useTurboModuleInterop(): Boolean {
var cached = useTurboModuleInteropCache
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<<0a4b05562ed8b30b7d4dabd5c8680d6d>>
* @generated SignedSource<<2877a4acf03951884d1d663fdf00b9f8>>
*/

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

@DoNotStrip public fun useSilenceErrorSMMViewNotFound(): Boolean

@DoNotStrip public fun useTraitHiddenOnIOS(): Boolean

@DoNotStrip public fun useTurboModuleInterop(): Boolean

@DoNotStrip public fun useTurboModules(): 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<<64b1d9667e6869ea4ba406222b307464>>
* @generated SignedSource<<c3ce57d947ffe2b5b404acd4a8527ae0>>
*/

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

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

bool useTurboModuleInterop() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useTurboModuleInterop");
Expand Down Expand Up @@ -738,6 +744,11 @@ bool JReactNativeFeatureFlagsCxxInterop::useSilenceErrorSMMViewNotFound(
return ReactNativeFeatureFlags::useSilenceErrorSMMViewNotFound();
}

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

bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::useTurboModuleInterop();
Expand Down Expand Up @@ -972,6 +983,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"useSilenceErrorSMMViewNotFound",
JReactNativeFeatureFlagsCxxInterop::useSilenceErrorSMMViewNotFound),
makeNativeMethod(
"useTraitHiddenOnIOS",
JReactNativeFeatureFlagsCxxInterop::useTraitHiddenOnIOS),
makeNativeMethod(
"useTurboModuleInterop",
JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),
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<<073595986845439fdcb30edc52dadc30>>
* @generated SignedSource<<f4d8c8c96e3d7075dc71b8ac048fc7e0>>
*/

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

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

static bool useTurboModuleInterop(
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<<eb8488e034b281dc5cf384aa48b0ecf0>>
* @generated SignedSource<<bd604e84ed03731ac48b2c0f41b36089>>
*/

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

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

bool ReactNativeFeatureFlags::useTurboModuleInterop() {
return getAccessor().useTurboModuleInterop();
}
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<<7b1258f9970366f0c068f28e2c16ce12>>
* @generated SignedSource<<8dc801da5ad5fd085dcedb245f7dee08>>
*/

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

/**
* iOS only. When true (default), shadow nodes carrying ShadowNodeTraits::Trait::Hidden are filtered out of the mounting slice. When false, those nodes stay in the slice and are hidden via UIView.hidden = YES in updateLayoutMetrics:.
*/
RN_EXPORT static bool useTraitHiddenOnIOS();

/**
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
*/
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<<85d9a99e79df5428b4b6264cedbc505c>>
* @generated SignedSource<<10aa043b91c4189bd7772066085e168d>>
*/

/**
Expand Down Expand Up @@ -1127,6 +1127,24 @@ bool ReactNativeFeatureFlagsAccessor::useSilenceErrorSMMViewNotFound() {
return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnIOS() {
auto flagValue = useTraitHiddenOnIOS_.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(61, "useTraitHiddenOnIOS");

flagValue = currentProvider_->useTraitHiddenOnIOS();
useTraitHiddenOnIOS_ = flagValue;
}

return flagValue.value();
}

bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
auto flagValue = useTurboModuleInterop_.load();

Expand All @@ -1136,7 +1154,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(61, "useTurboModuleInterop");
markFlagAsAccessed(62, "useTurboModuleInterop");

flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
Expand All @@ -1154,7 +1172,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(62, "useTurboModules");
markFlagAsAccessed(63, "useTurboModules");

flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
Expand All @@ -1172,7 +1190,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(63, "virtualViewPrerenderRatio");
markFlagAsAccessed(64, "virtualViewPrerenderRatio");

flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
Expand All @@ -1190,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::runtimeCrashUiThreadUtils() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.

markFlagAsAccessed(64, "runtimeCrashUiThreadUtils");
markFlagAsAccessed(65, "runtimeCrashUiThreadUtils");

flagValue = currentProvider_->runtimeCrashUiThreadUtils();
runtimeCrashUiThreadUtils_ = flagValue;
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<<8abeb54955dff119219c983bca1024e9>>
* @generated SignedSource<<98d2d767bf370439a9efc44a745ae802>>
*/

/**
Expand Down Expand Up @@ -93,6 +93,7 @@ class ReactNativeFeatureFlagsAccessor {
bool useRawPropsJsiValue();
bool useShadowNodeStateOnClone();
bool useSilenceErrorSMMViewNotFound();
bool useTraitHiddenOnIOS();
bool useTurboModuleInterop();
bool useTurboModules();
double virtualViewPrerenderRatio();
Expand All @@ -108,7 +109,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;

std::array<std::atomic<const char*>, 65> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 66> accessedFeatureFlags_;

std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> animatedShouldSignalBatch_;
Expand Down Expand Up @@ -171,6 +172,7 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> useRawPropsJsiValue_;
std::atomic<std::optional<bool>> useShadowNodeStateOnClone_;
std::atomic<std::optional<bool>> useSilenceErrorSMMViewNotFound_;
std::atomic<std::optional<bool>> useTraitHiddenOnIOS_;
std::atomic<std::optional<bool>> useTurboModuleInterop_;
std::atomic<std::optional<bool>> useTurboModules_;
std::atomic<std::optional<double>> virtualViewPrerenderRatio_;
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<<19c983e30b5131ab5904437f4cc9bbb4>>
* @generated SignedSource<<5cb395cf45a846c4e93b4eb5ca2d99e3>>
*/

/**
Expand Down Expand Up @@ -271,6 +271,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}

bool useTraitHiddenOnIOS() override {
return true;
}

bool useTurboModuleInterop() override {
return 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<<52f0e78c7c4e53f8adac6cc796a79d7c>>
* @generated SignedSource<<627e0e191716b63f3a5dd7fd343506b9>>
*/

/**
Expand Down Expand Up @@ -594,6 +594,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::useSilenceErrorSMMViewNotFound();
}

bool useTraitHiddenOnIOS() override {
auto value = values_["useTraitHiddenOnIOS"];
if (!value.isNull()) {
return value.getBool();
}

return ReactNativeFeatureFlagsDefaults::useTraitHiddenOnIOS();
}

bool useTurboModuleInterop() override {
auto value = values_["useTurboModuleInterop"];
if (!value.isNull()) {
Expand Down
Loading
Loading