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

Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode #37865

Closed
wants to merge 1 commit into from

Conversation

dmytrorykun
Copy link
Contributor

Summary:
In bridge mode UIManager's constants contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are genericBubblingEventTypes and genericDirectEventTypes. They are then merged into bubblingEventTypes and directEventTypes of every view config.

This diff replaces getNativeViewConfig binding with getConstants to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that constants will be cached on JS side just as it is done in bridge mode.

Differential Revision: D46698717

@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. p: Facebook Partner: Facebook Partner fb-exported labels Jun 13, 2023
@facebook-github-bot
Copy link
Contributor

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

dmytrorykun added a commit to dmytrorykun/react-native that referenced this pull request Jun 16, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: D46698717

fbshipit-source-id: a26ae4d5e7f81917628f034ebf88766caeea4e75
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Jun 16, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,045,226 -1
android hermes armeabi-v7a 8,294,501 +2
android hermes x86 9,561,417 -3
android hermes x86_64 9,403,753 +0
android jsc arm64-v8a 9,604,419 +0
android jsc armeabi-v7a 8,731,135 +1
android jsc x86 9,691,466 +1
android jsc x86_64 9,937,807 -1

Base commit: c803a5b
Branch: main

dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 19, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: 8b04fe2bd8f65c545cb852836736ca72d6e6f6de
dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 19, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: a0c273284bfd79753d10a0a7c8b0863ed0c00362
dmytrorykun added a commit to dmytrorykun/react-native that referenced this pull request Jun 20, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: D46698717

fbshipit-source-id: fa9fee4a9bea4a574dc024404fb27a1d4eb6c357
@facebook-github-bot
Copy link
Contributor

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

dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 20, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: 3a28131ad38fe8632caf9b5f37d8c0a55936e9e5
dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 27, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: 44295968b7b1307258bd66ee100238792a8f5e30
@facebook-github-bot
Copy link
Contributor

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

dmytrorykun added a commit to dmytrorykun/react-native that referenced this pull request Jun 27, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js#L110-L116) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L24-L32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Reviewed By: RSNara

Differential Revision: D46698717

fbshipit-source-id: e20f7ab8b57ae56c35a3cd8b617643a01bc817bb
dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 27, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: 9a58844f627f3135825178fcafafda05a3a04416
dmytrorykun added a commit to dmytrorykun/react-native that referenced this pull request Jun 27, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js#L110-L116) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L24-L32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Reviewed By: RSNara

Differential Revision: D46698717

fbshipit-source-id: d1eba91ba0c572a6b15d1341f08bf7421b3fc505
@facebook-github-bot
Copy link
Contributor

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

dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 27, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: 42091c3797bd6d5845e4b17a4c4a9c56883213fa
dmytrorykun pushed a commit to dmytrorykun/react-native that referenced this pull request Jun 28, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js?lines=110-117) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://www.internalfb.com/code/fbsource/[e79a64c30e96df858e159d2fb6c71c5aff422e19]/xplat/js/react-native-github/packages/react-native/Libraries/ReactNative/PaperUIManager.js?lines=24-32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Differential Revision: https://internalfb.com/D46698717

fbshipit-source-id: c74f6b78eb6d6887e160b32a61a6449bd4c26680
dmytrorykun added a commit to dmytrorykun/react-native that referenced this pull request Jun 28, 2023
… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js#L110-L116) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L24-L32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Reviewed By: RSNara

Differential Revision: D46698717

fbshipit-source-id: 5ce0ac0e7b48f2267465737125e18edcd8999813
@facebook-github-bot
Copy link
Contributor

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

… bridgeless mode (facebook#37865)

Summary:
Pull Request resolved: facebook#37865

In bridge mode UIManager's `constants` contain view configs for every registered native component and possibly some extra data.

On iOS there is no extra data, but on Android in addition to view configs there are `genericBubblingEventTypes` and `genericDirectEventTypes`. They are then [merged](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/getNativeComponentAttributes.js#L110-L116) into `bubblingEventTypes` and `directEventTypes` of every view config.

This diff replaces `getNativeViewConfig` binding with `getConstants` to make this behaviour possible in the bridgeless mode.

This diff also removes caching on native side with the expectation that `constants` will be cached on JS side just as [it is done](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L24-L32) in bridge mode.

Changelog: [Internal] - Expose UIManager.getConstants instead of getNativeViewConfig to JS in bridgeless mode.

Reviewed By: RSNara

Differential Revision: D46698717

fbshipit-source-id: a42d232ed131c0f6dbd6901dc262d5931fb8e6e4
@facebook-github-bot
Copy link
Contributor

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

@github-actions github-actions bot added the Merged This PR has been merged. label Jun 28, 2023
@github-actions
Copy link

This pull request was successfully merged by @dmytrorykun in a9618b3.

When will my fix make it into a release? | Upcoming Releases

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a9618b3.

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