Delete ReactVirtualTextViewManager from codebase (#53945)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53945

ReactVirtualTextViewManager is an internal legacy architecture class that's unused, we are deleting it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83186611

fbshipit-source-id: 323c77077ab91ffec35af8e4c12da4bdf13fa233
This commit is contained in:
David Vacca
2025-09-26 14:07:25 -07:00
committed by Facebook GitHub Bot
parent dd6c23fb61
commit 589bf35cd1
2 changed files with 0 additions and 59 deletions
@@ -152,7 +152,6 @@ constructor(private val config: MainPackageConfig? = null) :
if (ReactNativeFeatureFlags.enablePreparedTextLayout()) PreparedLayoutTextViewManager()
else ReactTextViewManager(),
ReactViewManager(),
com.facebook.react.views.text.ReactVirtualTextViewManager(),
ReactUnimplementedViewManager(),
)
@@ -195,10 +194,6 @@ constructor(private val config: MainPackageConfig? = null) :
else ReactTextViewManager()
},
ReactViewManager.REACT_CLASS to ModuleSpec.viewManagerSpec { ReactViewManager() },
com.facebook.react.views.text.ReactVirtualTextViewManager.REACT_CLASS to
ModuleSpec.viewManagerSpec {
com.facebook.react.views.text.ReactVirtualTextViewManager()
},
ReactUnimplementedViewManager.REACT_CLASS to
ModuleSpec.viewManagerSpec { ReactUnimplementedViewManager() },
)
@@ -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.
*/
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.common.annotations.internal.LegacyArchitectureLogger
import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.uimanager.BaseViewManager
import com.facebook.react.uimanager.ThemedReactContext
/**
* Manages raw text nodes. Since they are used only as a virtual nodes any type of native view
* operation will throw an [IllegalStateException]
*/
@Suppress("DEPRECATION")
@ReactModule(name = ReactVirtualTextViewManager.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 ReactVirtualTextViewManager : BaseViewManager<View, ReactVirtualTextShadowNode>() {
override fun getName(): String = REACT_CLASS
override fun createViewInstance(context: ThemedReactContext): View {
throw IllegalStateException("Attempt to create a native view for RCTVirtualText")
}
override fun updateExtraData(view: View, extraData: Any): Unit = Unit
override fun getShadowNodeClass(): Class<ReactVirtualTextShadowNode> =
ReactVirtualTextShadowNode::class.java
override fun createShadowNodeInstance(): ReactVirtualTextShadowNode = ReactVirtualTextShadowNode()
internal companion object {
const val REACT_CLASS: String = "RCTVirtualText"
init {
LegacyArchitectureLogger.assertLegacyArchitecture(
"ReactVirtualTextViewManager",
LegacyArchitectureLogLevel.ERROR,
)
}
}
}