Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InteropUIBlockListener to support react-native-view-shot on Bridgeless #43594

Closed
wants to merge 1 commit into from

Conversation

cortinico
Copy link
Contributor

Summary:
I've been migrating react-native-view-shot to Fabric by using the InteropUiBlockListener
and I've realized that the interop layer doesn't work well.

  1. FabricUIManager needs to implement UIBlockViewResolver in order for the interop layer to work correctly.
  2. We need to hook addUIBlock to the didDispatchMountItems callback otherwise the UIBlocks won't be executed at all.

Changelog:
[Android] [Fixed] - Fix InteropUIBlockListener to support react-native-view-shot on Bridgeless

Differential Revision: D55187939

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Mar 21, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55187939

@analysis-bot
Copy link

analysis-bot commented Mar 21, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 18,093,692 +8
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,462,791 -4
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: c574ca5
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55187939

…eless (facebook#43594)

Summary:

I've been migrating `react-native-view-shot` to Fabric by using the `InteropUiBlockListener`
and I've realized that the interop layer doesn't work well.

1. FabricUIManager needs to implement `UIBlockViewResolver` in order for the interop layer to work correctly.
2. We need to hook `addUIBlock` to the `didDispatchMountItems` callback otherwise the UIBlocks won't be executed at all.

Changelog:
[Android] [Fixed] - Fix InteropUIBlockListener to support react-native-view-shot on Bridgeless

Differential Revision: D55187939
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55187939

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 21, 2024
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 24a3dad.

huntie pushed a commit that referenced this pull request Mar 25, 2024
…eless (#43594)

Summary:
Pull Request resolved: #43594

I've been migrating `react-native-view-shot` to Fabric by using the `InteropUiBlockListener`
and I've realized that the interop layer doesn't work well.

1. FabricUIManager needs to implement `UIBlockViewResolver` in order for the interop layer to work correctly.
2. We need to hook `addUIBlock` to the `didDispatchMountItems` callback otherwise the UIBlocks won't be executed at all.

Changelog:
[Android] [Fixed] - Fix InteropUIBlockListener to support react-native-view-shot on Bridgeless

Reviewed By: javache

Differential Revision: D55187939

fbshipit-source-id: d048b4b5eed77fa856fdfac17c0df5f23fd44844
This was referenced Jun 28, 2024
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. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants