From 99b7cb77a7eddfe370a8dc449ede12918b9aa5c8 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 26 Sep 2025 14:07:25 -0700 Subject: [PATCH] Delete ReactRawTextShadowNode from codebase (#53949) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53949 ReactRawTextShadowNode is part of legacy architecture and unused, let's delete it changelog: [internal] internal Reviewed By: javache Differential Revision: D83188351 fbshipit-source-id: 19514d8e5d96d2d2fb4fb4b25d422282894c8c18 --- .../views/text/ReactBaseTextShadowNode.kt | 4 +- .../views/text/ReactRawTextShadowNode.kt | 38 ------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextShadowNode.kt diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.kt index fb845d46264..317a09e4ca2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.kt @@ -523,9 +523,7 @@ public constructor( val child: ReactShadowNode<*> = textShadowNode.getChildAt(i) @Suppress("DEPRECATION") - if (child is ReactRawTextShadowNode) { - child.text?.let { sb.append(apply(it, textAttributes.textTransform)) } - } else if (child is ReactBaseTextShadowNode) { + if (child is ReactBaseTextShadowNode) { buildSpannedFromShadowNode( child, sb, diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextShadowNode.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextShadowNode.kt deleted file mode 100644 index d72ef95afc1..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextShadowNode.kt +++ /dev/null @@ -1,38 +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 com.facebook.react.common.annotations.internal.LegacyArchitecture -import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel -import com.facebook.react.uimanager.ReactShadowNodeImpl -import com.facebook.react.uimanager.annotations.ReactProp - -/** - * [com.facebook.react.uimanager.ReactShadowNode] class for pure raw text node (aka `textContent` in - * terms of DOM). Raw text node can only have simple string value without any attributes, properties - * or state. - */ -@Deprecated( - message = "This class is part of Legacy Architecture and will be removed in a future release", - level = DeprecationLevel.WARNING, -) -@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR) -internal class ReactRawTextShadowNode : ReactShadowNodeImpl() { - @set:ReactProp(name = "text") - var text: String? = null - set(value) { - field = value - markUpdated() - } - - override fun isVirtual(): Boolean = true - - override fun toString(): String = "$viewClass [text: $text]" -}