Skip to content

Define continuous and idle priority for raw events and expose them to React via nativeFabricUIManager#50627

Closed
rubennorte wants to merge 1 commit into
facebook:mainfrom
rubennorte:export-D72791968
Closed

Define continuous and idle priority for raw events and expose them to React via nativeFabricUIManager#50627
rubennorte wants to merge 1 commit into
facebook:mainfrom
rubennorte:export-D72791968

Conversation

@rubennorte
Copy link
Copy Markdown
Contributor

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
  2. Enable the fixMappingOfEventPrioritiesBetweenFabricAndReact feature flag.

Differential Revision: D72791968

@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 labels Apr 10, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

… 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
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

rubennorte added a commit to facebook/react 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.
github-actions Bot pushed a commit to facebook/react 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 facebook-github-bot added the Merged This PR has been merged. label Apr 10, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 02bf24b.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in 02bf24b

When will my fix make it into a release? | How to file a pick request?

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

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