- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor(Worklets): JavaScript NativeReanimatedModule #6557
Merged
+192
−108
Conversation
This file contains 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
969b4bb
to
3c08411
Compare
1 task
6 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 24, 2024
## Summary Required by: - #6557 `NativeReanimatedModule` depends on types from Layout Animations - this makes impossible to embed its interface in `commonTypes.ts` since they can't have any imports. I merged some types to prevent circular dependencies. ## Test plan - [x] CI Green
Base automatically changed from
@tjzel/worklets/javascript-modules-refactor
to
main
October 24, 2024 09:01
tjzel
commented
Oct 24, 2024
packages/react-native-reanimated/__tests__/hooks.useSharedValue.test.tsx
Show resolved
Hide resolved
piaskowyk
approved these changes
Oct 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
I'd like to review this PR prior to merging |
tomekzaw
requested changes
Oct 29, 2024
packages/react-native-reanimated/__tests__/hooks.useSharedValue.test.tsx
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/NativeReanimated.ts
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/NativeReanimated.ts
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/js-reanimated/index.ts
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/js-reanimated/JSReanimated.ts
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/NativeReanimated.ts
Show resolved
Hide resolved
packages/react-native-reanimated/src/ReanimatedModule/NativeReanimated.ts
Show resolved
Hide resolved
Also, could you please give a general overview of the changes (e.g. which classes/functions/files have been renamed, which files have been moved to another directory) in the PR description? 🙏 |
tomekzaw
approved these changes
Oct 29, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 19, 2024
This pull request is one of many which replace - #6378 since that PR is extensive and too difficult to review. ## Summary Adding a second Native Module for Worklets. It's initial responsibility for now is forwarding `valueUnpackerCode` to Reanimated Module. While it seems silly, it's a good start since it sets up the whole pipeline of: ```tree typescript ├── android │ └── cpp └── ios └── cpp ``` (I was too lazy to use mermaid, long live `mkdir -p`) Follow up PRs will move more and more responsibilities from Reanimated to Worklets. Requires: - #6556 - #6557 ## Test plan - [x] All GitHub Actions pass - [x] Compatibility Github Action passes - [x] debug Android works - [x] release Android works - [x] debug iOS works - [x] release iOS works
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
Requires:
QoL refactor that will allow easier NativeWorkletsModule embedment.
Summary:
NativeReanimated.ts
->ReanimatedModule/NativeReanimated.ts
js-reanimated/
->ReanimatedModule/js-reanimated
NativeReanimatedModule
andJSReanimatedModule
aren't exported anymore. The only way to obtain them is viacreateReanimatedModule
, that should yield less error prone code.NativeWorkletsModule
will follow the same pattern.Test plan