Mark interop classes and interfaces as Unstable

Summary:
Mark interop classes and interfaces as Unstable

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: fkgozali, arushikesarwani94

Differential Revision: D54128912

fbshipit-source-id: 56956fc38bac01f461bf686fda0f05a7a105008e
This commit is contained in:
David Vacca
2024-02-23 15:22:45 -08:00
committed by Facebook GitHub Bot
parent 0274ad076d
commit a15e8f318d
7 changed files with 12 additions and 8 deletions
@@ -2626,14 +2626,6 @@ public class com/facebook/react/fabric/events/FabricEventEmitter : com/facebook/
public fun receiveTouches (Ljava/lang/String;Lcom/facebook/react/bridge/WritableArray;Lcom/facebook/react/bridge/WritableArray;)V
}
public abstract interface class com/facebook/react/fabric/interop/UIBlock {
public abstract fun execute (Lcom/facebook/react/fabric/interop/UIBlockViewResolver;)V
}
public abstract interface class com/facebook/react/fabric/interop/UIBlockViewResolver {
public abstract fun resolveView (I)Landroid/view/View;
}
public abstract interface class com/facebook/react/fabric/mounting/LayoutMetricsConversions {
public static fun getMaxSize (I)F
public static fun getMinSize (I)F
@@ -9,6 +9,8 @@
package com.facebook.react.fabric.interop
import com.facebook.react.common.annotations.UnstableReactNativeAPI
/**
* Interop Interface added to support `addUiBlock` and `prependUIBlock` methods in Fabric.
* Historically those methods were only available in `UIManagerModule` (Paper, the old renderer).
@@ -17,6 +19,7 @@ package com.facebook.react.fabric.interop
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
* or View Commands to achieve a same results.
*/
@UnstableReactNativeAPI
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
public fun interface UIBlock {
/**
@@ -8,6 +8,7 @@
package com.facebook.react.fabric.interop
import android.view.View
import com.facebook.react.common.annotations.UnstableReactNativeAPI
/**
* This interface is used as receiver parameter for [UIBlock].
@@ -17,6 +18,7 @@ import android.view.View
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
* or View Commands to achieve a same results.
*/
@UnstableReactNativeAPI
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
public interface UIBlockViewResolver {
/**
@@ -11,8 +11,10 @@ package com.facebook.react.bridge.interop
import com.facebook.react.bridge.WritableArray
import com.facebook.react.bridge.WritableMap
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.uimanager.events.RCTEventEmitter
@UnstableReactNativeAPI
class FakeRCTEventEmitter : RCTEventEmitter {
override fun receiveEvent(targetReactTag: Int, eventName: String, event: WritableMap?) = Unit
@@ -19,6 +19,7 @@ import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
@OptIn(UnstableReactNativeAPI::class)
class InteropModuleRegistryTest {
lateinit var underTest: InteropModuleRegistry
@@ -7,10 +7,12 @@
package com.facebook.react.fabric.internal.interop
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.testutils.fakes.FakeUIManager
import org.junit.Assert.assertEquals
import org.junit.Test
@OptIn(UnstableReactNativeAPI::class)
class InteropUiBlockListenerTest {
@Test
@@ -15,8 +15,10 @@ import com.facebook.react.bridge.ReadableMap
import com.facebook.react.bridge.UIManager
import com.facebook.react.bridge.UIManagerListener
import com.facebook.react.bridge.WritableMap
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.fabric.interop.UIBlockViewResolver
@OptIn(UnstableReactNativeAPI::class)
class FakeUIManager : UIManager, UIBlockViewResolver {
// The number of times resolveView was called