Skip to content

Add ViewTransitionModule for enter/exit/share transitions#55752

Open
zeyap wants to merge 2 commits intofacebook:mainfrom
zeyap:export-D92537219
Open

Add ViewTransitionModule for enter/exit/share transitions#55752
zeyap wants to merge 2 commits intofacebook:mainfrom
zeyap:export-D92537219

Conversation

@zeyap
Copy link
Contributor

@zeyap zeyap commented Feb 25, 2026

Summary:
Adds ViewTransitionModule - the native implementation of UIManagerViewTransitionDelegate that tracks view transition state and orchestrates enter/exit/share transitions.

The module:

  • Captures layout metrics from root for participating views via captureLayoutMetricsFromRoot
  • Manages view-transition-name registration (applyViewTransitionName, cancelViewTransitionName, restoreViewTransitionName)
  • Detects transition type (enter/exit/share) based on old/new layout snapshots
  • Orchestrates transition lifecycle via startViewTransition

Scheduler initializes the module when viewTransitionEnabled feature flag is enabled.

Changelog:

[General] [Added] - ViewTransitionModule for React Native View Transitions

Reviewed By: sammy-SC

Differential Revision: D92537219

@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 Feb 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

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

facebook#55742)

Summary:

Changelog:
[General] [Added] - Add UIManagerViewTransitionDelegate interface and View Transition APIs

Adds `UIManagerViewTransitionDelegate` interface and View Transition APIs to UIManager, enabling integration with React reconciler's `<ViewTransition/>` component. 

Exposes JSI bindings in UIManagerBinding, which will be consumed by react fabric renderer (facebook/react#35764)
- `measureInstance` - returns layout metrics and calls `captureLayoutMetricsFromRoot` to capture snapshot
- `applyViewTransitionName` / `cancelViewTransitionName` / `restoreViewTransitionName` - manage transition name registration
- `startViewTransition` - orchestrates transition lifecycle with mutation/ready/complete callbacks

The delegate methods are gated by the `viewTransitionEnabled` feature flag.

Reviewed By: sammy-SC

Differential Revision: D92537193
…5752)

Summary:

Adds `ViewTransitionModule` - the native implementation of `UIManagerViewTransitionDelegate` that tracks view transition state and orchestrates enter/exit/share transitions.

The module:
- Captures layout metrics from root for participating views via `captureLayoutMetricsFromRoot`
- Manages view-transition-name registration (`applyViewTransitionName`, `cancelViewTransitionName`, `restoreViewTransitionName`)
- Detects transition type (enter/exit/share) based on old/new layout snapshots
- Orchestrates transition lifecycle via `startViewTransition`

Scheduler initializes the module when `viewTransitionEnabled` feature flag is enabled.

## Changelog:

[General] [Added] - ViewTransitionModule for React Native View Transitions

Reviewed By: sammy-SC

Differential Revision: D92537219
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