From 969e14271c1d9686d9452f34d3fe47cb1503b62a Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 26 Sep 2025 14:07:25 -0700 Subject: [PATCH] Delete ReactRawTextManager from codebase (#53947) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53947 ReactRawTextManager is legacy architecture and unused, let's delete it changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D83187075 fbshipit-source-id: 4e4f7feb3178b3f95a71ff805ec7d784f2811285 --- .../facebook/react/shell/MainReactPackage.kt | 3 -- .../react/views/text/ReactRawTextManager.kt | 54 ------------------- 2 files changed, 57 deletions(-) delete mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt index ce74cab1d22..36684e8d8c3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt @@ -147,7 +147,6 @@ constructor(private val config: MainPackageConfig? = null) : FrescoBasedReactTextInlineImageViewManager(), ReactImageManager(), ReactModalHostManager(), - com.facebook.react.views.text.ReactRawTextManager(), ReactTextInputManager(), if (ReactNativeFeatureFlags.enablePreparedTextLayout()) PreparedLayoutTextViewManager() else ReactTextViewManager(), @@ -183,8 +182,6 @@ constructor(private val config: MainPackageConfig? = null) : ReactImageManager.REACT_CLASS to ModuleSpec.viewManagerSpec { ReactImageManager() }, ReactModalHostManager.REACT_CLASS to ModuleSpec.viewManagerSpec { ReactModalHostManager() }, - com.facebook.react.views.text.ReactRawTextManager.REACT_CLASS to - ModuleSpec.viewManagerSpec { com.facebook.react.views.text.ReactRawTextManager() }, ReactTextInputManager.REACT_CLASS to ModuleSpec.viewManagerSpec { ReactTextInputManager() }, ReactTextViewManager.REACT_CLASS to diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt deleted file mode 100644 index c5c8e4bf5c5..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -@file:Suppress("DEPRECATION") - -package com.facebook.react.views.text - -import android.view.View -import com.facebook.react.common.annotations.internal.LegacyArchitecture -import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel -import com.facebook.react.module.annotations.ReactModule -import com.facebook.react.uimanager.ThemedReactContext -import com.facebook.react.uimanager.ViewManager - -/** - * Manages raw text nodes (aka `textContent` in terms of DOM). Since they are used only as a virtual - * nodes, any type of native view operation will throw an [IllegalStateException]. - */ -@ReactModule(name = ReactRawTextManager.REACT_CLASS) -@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR) -@Deprecated( - message = "This class is part of Legacy Architecture and will be removed in a future release", - level = DeprecationLevel.WARNING, -) -internal class ReactRawTextManager : ViewManager() { - - override fun getName(): String { - return REACT_CLASS - } - - public override fun createViewInstance(context: ThemedReactContext): ReactTextView = - throw IllegalStateException("Attempt to create a native view for RCTRawText") - - override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View = - throw IllegalStateException("Attempt to recycle a native view for RCTRawText") - - override fun updateExtraData(view: View, extraData: Any): Unit = Unit - - override fun getShadowNodeClass(): Class { - return ReactRawTextShadowNode::class.java - } - - override fun createShadowNodeInstance(): ReactRawTextShadowNode { - return ReactRawTextShadowNode() - } - - internal companion object { - const val REACT_CLASS: String = "RCTRawText" - } -}