-
Notifications
You must be signed in to change notification settings - Fork 49.9k
[RN] Map Fabric priorities to reconciler priorities correctly #32847
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
Merged
rubennorte
merged 1 commit into
facebook:main
from
rubennorte:fix-fabric-event-priorities
Apr 10, 2025
Merged
[RN] Map Fabric priorities to reconciler priorities correctly #32847
rubennorte
merged 1 commit into
facebook:main
from
rubennorte:fix-fabric-event-priorities
Apr 10, 2025
+10
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Comparing: c44e4a2...d7a7ac1 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
d54b7db to
d7a7ac1
Compare
rubennorte
added a commit
to rubennorte/react-native
that referenced
this pull request
Apr 10, 2025
… React via nativeFabricUIManager Summary: Changelog: [internal] This defines 2 new priorities in Fabric, matching the definitions in React: * Continuous * Idle They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`. It also adds the mapping from the raw event priorities to the Fabric event priorities. This change doesn't have any effect at the moment. For these to come into effect, we need to: 1. Fix the mapping between Fabric priorities and React priorities in the React repository. See facebook/react#32847 2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag. Differential Revision: D72791968
javache
approved these changes
Apr 10, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Apr 10, 2025
## Summary This fixes how we map priorities between Fabric and the React reconciler. At the moment, we're only considering default and discrete priorities, when there's a larger range of priorities available. In Fabric, we'll test supporting additional priorities soon. For that test to do something useful, we need the new priorities to be mapped to reconciler priorities correctly, which is what this change is done. > [!IMPORTANT] > At the moment, this is a no-op because Fabric is only reporting default and discrete event priorities. ## How did you test this change? Will test e2e on React Native on top of facebook/react-native#50627 The changes are gated in React Native, so we'll use that feature flag to test this. DiffTrain build for [5e9b487](5e9b487)
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Apr 10, 2025
… React via nativeFabricUIManager (#50627) Summary: Pull Request resolved: #50627 Changelog: [internal] This defines 2 new priorities in Fabric, matching the definitions in React: * Continuous * Idle They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`. It also adds the mapping from the raw event priorities to the Fabric event priorities. This change doesn't have any effect at the moment. For these to come into effect, we need to: 1. Fix the mapping between Fabric priorities and React priorities in the React repository. See facebook/react#32847 2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag. Reviewed By: javache Differential Revision: D72791968 fbshipit-source-id: 525b6e5c99dc0ddc1e5c60fdb5b73f0555e5f0d3
uffoltzl
pushed a commit
to uffoltzl/react-native
that referenced
this pull request
Apr 18, 2025
… React via nativeFabricUIManager (facebook#50627) Summary: Pull Request resolved: facebook#50627 Changelog: [internal] This defines 2 new priorities in Fabric, matching the definitions in React: * Continuous * Idle They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`. It also adds the mapping from the raw event priorities to the Fabric event priorities. This change doesn't have any effect at the moment. For these to come into effect, we need to: 1. Fix the mapping between Fabric priorities and React priorities in the React repository. See facebook/react#32847 2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag. Reviewed By: javache Differential Revision: D72791968 fbshipit-source-id: 525b6e5c99dc0ddc1e5c60fdb5b73f0555e5f0d3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This fixes how we map priorities between Fabric and the React reconciler. At the moment, we're only considering default and discrete priorities, when there's a larger range of priorities available.
In Fabric, we'll test supporting additional priorities soon. For that test to do something useful, we need the new priorities to be mapped to reconciler priorities correctly, which is what this change is done.
Important
At the moment, this is a no-op because Fabric is only reporting default and discrete event priorities.
How did you test this change?
Will test e2e on React Native on top of facebook/react-native#50627
The changes are gated in React Native, so we'll use that feature flag to test this.