Skip to content

Commit

Permalink
Expose private node management methods in UIManager (facebook#33688)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#33688

These methods used to be public in the legacy implementation, and hiding them significantly reduces amount of customization available to other clients outside Fabric core.

Changelog: [Internal] Allow external callers to call UIManager methods

Reviewed By: cipolleschi

Differential Revision: D35818114

fbshipit-source-id: 4dc4177c82b5db9ae3d136a1a83f5ec3123b971f
  • Loading branch information
cortinico authored and facebook-github-bot committed Apr 26, 2022
1 parent 54db5f2 commit 59385e8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions ReactCommon/react/renderer/uimanager/UIManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ class UIManager final : public ShadowTreeDelegate {
RootShadowNode::Shared const &oldRootShadowNode,
RootShadowNode::Unshared const &newRootShadowNode) const override;

private:
friend class UIManagerBinding;
friend class Scheduler;
friend class SurfaceHandler;

// `TimelineController` needs to call private `getShadowTreeRegistry()`.
friend class TimelineController;

ShadowNode::Shared createNode(
Tag tag,
std::string const &componentName,
Expand Down Expand Up @@ -174,6 +166,13 @@ class UIManager final : public ShadowTreeDelegate {
const ShadowNode::Shared &shadowNode,
std::string const &eventType);

ShadowTreeRegistry const &getShadowTreeRegistry() const;

private:
friend class UIManagerBinding;
friend class Scheduler;
friend class SurfaceHandler;

/**
* Configure a LayoutAnimation to happen on the next commit.
* This API configures a global LayoutAnimation starting from the root node.
Expand All @@ -184,8 +183,6 @@ class UIManager final : public ShadowTreeDelegate {
jsi::Value const &successCallback,
jsi::Value const &failureCallback) const;

ShadowTreeRegistry const &getShadowTreeRegistry() const;

SharedComponentDescriptorRegistry componentDescriptorRegistry_;
UIManagerDelegate *delegate_;
UIManagerAnimationDelegate *animationDelegate_{nullptr};
Expand Down

0 comments on commit 59385e8

Please sign in to comment.