Skip to content

Conversation

@zeyap
Copy link
Contributor

@zeyap zeyap commented Jan 5, 2026

Summary:

Changelog:

[General] [Added] - add UIManagerCommitHook::shadowTreeDidFinishTransaction

Added this API so we can tell at end of Fabric mount phase which source the commit comes from. This is useful for identifying that a React update just gets mounted.

  • UIManagerMountHook::shadowTreeDidMount is called at similar timing however it doesn't include CommitSource information

Differential Revision: D89573534

zeyap added 2 commits January 5, 2026 14:07
…View

Summary:
## Changelog:

[General] [Added] - optionally calculate originFromRoot for ShadowNode and pass to ShadowView

* If a LayoutableShadowNode calls `layout()` with `LayoutContext.includeOriginFromRoot==true`, all its (recursive) children will calculate `originFromRoot`. This will be needed for shared transition/view transition, where we'll later need to know the absolute position of a shadowNode/shadowView
  * if includeOriginFromRoot is false, there's no overhead of calculating `originFromRoot_` field
* the way originFromRoot is calculated: we first initialize `originFromRoot_` on the LayoutableShadowNode that enables `includeOriginFromRoot` (using `LayoutableShadowNode::computeRelativeLayoutMetrics`, which traverses all the ancestors), then calculate originFromRoot for children in its subtree recursively (`LayoutableShadowNode::computeOriginFromRoot` which only calculates by the difference from immediate parent)

Differential Revision: D89573536
Summary:
## Changelog:

[General] [Added] - add UIManagerCommitHook::shadowTreeDidFinishTransaction

Added this API so we can tell at end of Fabric mount phase which source the commit comes from. This is useful for identifying that a React update just gets mounted.
* UIManagerMountHook::shadowTreeDidMount is called at similar timing however it doesn't include CommitSource information

Differential Revision: D89573534
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 5, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 5, 2026

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89573534.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants