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

Allow value extraction from folly::dynamic events #50032

Closed
wants to merge 2 commits into from

Conversation

rozele
Copy link
Contributor

@rozele rozele commented Mar 14, 2025

Summary:
In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the EventPayload::extractValue method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

Changelog

[Internal]

Differential Revision: D71198197

@facebook-github-bot facebook-github-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 Mar 14, 2025
@facebook-github-bot
Copy link
Contributor

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 62e4e5f to 06c284f Compare March 14, 2025 17:20
@facebook-github-bot
Copy link
Contributor

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 06c284f to 2a640d8 Compare March 14, 2025 17:37
@facebook-github-bot
Copy link
Contributor

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch 2 times, most recently from 006211c to a9ede26 Compare March 14, 2025 19:27
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

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

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from a9ede26 to 45e1bca Compare March 14, 2025 19:32
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 45e1bca to 59cef2a Compare March 14, 2025 21:01
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 59cef2a to b385cc8 Compare March 14, 2025 21:01
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

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

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 14, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 0faee93 to 7da5f44 Compare March 17, 2025 15:55
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 7da5f44 to 0197deb Compare March 17, 2025 16:41
@facebook-github-bot
Copy link
Contributor

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 17, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Differential Revision: D71198197
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 0197deb to 37f20a1 Compare March 18, 2025 14:40
@facebook-github-bot
Copy link
Contributor

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

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
Summary:
Pull Request resolved: facebook#49988

NativeAnimated currently depends on folly::dynamic event payloads for event-driven animations. While some events (e.g., ScrollEvent.h) have an `asDynamic` implementation, not all events do. In practice, NativeAnimated just needs to be able to extract an numeric value from a path to drive an animation.

Rather than converting events to dynamic, or otherwise special casing event handling, this change allows arbitrary payloads to implement `EventPayload::extractValue` to retrieve JS property path values directly from events, without intermediate conversions to dynamic.

## Changelog

[Internal]

Differential Revision: D71046682
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
@rozele rozele force-pushed the export-D71198197 branch from 37f20a1 to 7bebe17 Compare March 18, 2025 16:39
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
…#50032)

Summary:

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

Differential Revision: D71198197
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

Reviewed By: javache

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

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

@rozele rozele force-pushed the export-D71198197 branch from 7bebe17 to b4baf09 Compare March 18, 2025 16:44
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 18, 2025
Summary:
Pull Request resolved: facebook#50032

In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.

Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.

When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.

## Changelog

[Internal]

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

This pull request has been merged in 9d7cdfe.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 19, 2025
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.

2 participants