Skip to content

Add ViewTransitionModule for enter/exit/share transitions#55752

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

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

Conversation

@zeyap
Copy link
Copy Markdown
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
Copy Markdown

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.

zeyap added a commit to zeyap/react-native that referenced this pull request Feb 25, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 26, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 26, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch 2 times, most recently from 6227d29 to 781cca4 Compare February 26, 2026 17:51
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 26, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 26, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…5752)

Summary:
Pull Request resolved: facebook#55752

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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…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
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch 2 times, most recently from 78da243 to 46022eb Compare February 27, 2026 22:01
zeyap added a commit to zeyap/react-native that referenced this pull request Feb 27, 2026
…5752)

Summary:
Pull Request resolved: facebook#55752

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
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch from 46022eb to b313704 Compare March 2, 2026 15:52
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…5752)

Summary:
Pull Request resolved: facebook#55752

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
@zeyap zeyap force-pushed the export-D92537219 branch from b313704 to 35a7cb1 Compare March 2, 2026 15:55
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…5752)

Summary:
Pull Request resolved: facebook#55752

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
@zeyap zeyap force-pushed the export-D92537219 branch from 35a7cb1 to 798f10d Compare March 2, 2026 16:00
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch from 798f10d to 519fe85 Compare March 2, 2026 19:17
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch from 519fe85 to 2c4d48c Compare March 2, 2026 19:20
Summary:
Adds `UIManagerViewTransitionDelegate` interface and View Transition APIs to UIManager, enabling integration with React reconciler's `<ViewTransition/>` component.

Exposes JSI bindings in UIManagerBinding:
- `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.

RCP: https://docs.google.com/document/d/1zqSkRD5wbVXhcm7dtD4E9Pc9LvhgO3YASwndJycmJhM/edit?tab=t.0
Architecture diagram: https://www.internalfb.com/excalidraw/EX697052

Differential Revision: D92537193
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 3, 2026
…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
@zeyap zeyap force-pushed the export-D92537219 branch 2 times, most recently from 9b2a5e1 to 5bce1c2 Compare March 3, 2026 00:39
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 3, 2026
…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
…5752)

Summary:
Pull Request resolved: facebook#55752

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
@zeyap zeyap force-pushed the export-D92537219 branch from 5bce1c2 to f5d1580 Compare March 3, 2026 00:56
@meta-codesync meta-codesync bot closed this in f81f73e Mar 3, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 3, 2026

This pull request has been merged in f81f73e.

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
…5752)

Summary:
Pull Request resolved: facebook#55752

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

fbshipit-source-id: c6772394efaf6aaedbf4991b951d2eb03eaf2fba
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 Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants