mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove deprecated measureLayoutRelativeToParent of UIManagerModule (#44452)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44452 `measureLayoutRelativeToParent` was deprecated 5 years ago in D16471845 and doesn't have [JS usages](https://fburl.com/code/tgwon7nb) For the JS exposed UIManager API for measureLayoutRelativeToParent is through [UIImplementation.measureLayoutRelativeToParent()](https://www.internalfb.com/code/fbsource/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java?lines=804-815) Hence deleting this for 0.75 Release. This will simplify the backwards compatibility of UIManagerModule Changelog: [Android][Removed] Delete UIManagerModule.measureLayoutRelativeToParent() Reviewed By: javache Differential Revision: D57069921 fbshipit-source-id: 9f871424a39caf3cbeaa5570c7e101a714c11aa6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4290ef5d0d
commit
958f8e2bb5
@@ -1384,24 +1384,6 @@ RCT_EXPORT_METHOD(measureLayout
|
||||
RCTMeasureLayout(shadowView, ancestorShadowView, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the computed recursive offset layout in a dictionary form. The
|
||||
* returned values are relative to the `ancestor` shadow view. Returns `nil`, if
|
||||
* the `ancestor` shadow view is not actually an `ancestor`. Does not touch
|
||||
* anything on the main UI thread. Invokes supplied callback with (x, y, width,
|
||||
* height).
|
||||
*/
|
||||
RCT_EXPORT_METHOD(measureLayoutRelativeToParent
|
||||
: (nonnull NSNumber *)reactTag errorCallback
|
||||
: (__unused RCTResponseSenderBlock)errorCallback callback
|
||||
: (RCTResponseSenderBlock)callback)
|
||||
{
|
||||
RCTLogWarn(
|
||||
@"RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450");
|
||||
RCTShadowView *shadowView = _shadowViewRegistry[reactTag];
|
||||
RCTMeasureLayout(shadowView, shadowView.reactSuperview, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* JS sets what *it* considers to be the responder. Later, scroll views can use
|
||||
* this in order to determine if scrolling is appropriate.
|
||||
|
||||
@@ -5069,7 +5069,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
|
||||
public fun measure (ILcom/facebook/react/bridge/Callback;)V
|
||||
public fun measureInWindow (ILcom/facebook/react/bridge/Callback;)V
|
||||
public fun measureLayout (IILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
|
||||
public fun measureLayoutRelativeToParent (ILcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
|
||||
public fun onBatchComplete ()V
|
||||
public fun onHostDestroy ()V
|
||||
public fun onHostPause ()V
|
||||
|
||||
-16
@@ -525,22 +525,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
mUIImplementation.measureLayout(tag, ancestorTag, errorCallback, successCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like {@link #measure} and {@link #measureLayout} but measures relative to the immediate parent.
|
||||
*
|
||||
* <p>NB: Unlike {@link #measure}, this will measure relative to the view layout, not the visible
|
||||
* window which can cause unexpected results when measuring relative to things like ScrollViews
|
||||
* that can have offset content on the screen.
|
||||
*
|
||||
* @deprecated this method will not be available in FabricUIManager class.
|
||||
*/
|
||||
@ReactMethod
|
||||
@Deprecated
|
||||
public void measureLayoutRelativeToParent(
|
||||
int tag, Callback errorCallback, Callback successCallback) {
|
||||
mUIImplementation.measureLayoutRelativeToParent(tag, errorCallback, successCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the touch target child native view in the supplied root view hierarchy, given a react
|
||||
* target location.
|
||||
|
||||
Reference in New Issue
Block a user