☂️ Help us Kotlin-ify React Native - Round 3
☂️ Help us Kotlin-ify React Native - Round 3
Hey all 👋 After the successful second round, we're back with another round of tasks to help us improve Kotlin support in React Native core. In this stage we are looking for help to migrate a few more files to Kotlin.
How to work
If you wish to grab one of the tasks, you should:
- Verify that the task is not claimed yet.
- Comment here that you claim a task.
- Start working on the task. Testing instructions are below.
- Send the PR for review. Ping @mateoguzmana, @cortinico or @mdvacca for a review.
- You can’t claim more than one task at a time.
- If you’re not completing the task within a week, we’ll release it for the next contributor.
Code formatting
Please use KtFmt to format Kotlin classes. You can use the web UI to reformat directly from the browser.
Migrating files to Kotlin
Please act as follow:
- Fork and clone the repo
- Verify that RN-Tester, our reference app, runs with yarn && yarn android from the root folder
- Migrate the file to Kotlin
- Verify that RN-Tester runs again using the same command.
Other important things to take into account:
- Avoid using Hungarian notation for the variables when the file is migrated. E.g.:
mMyAwesomePropertyshould becomemyAwesomeProperty - You might have to run the project in old architecture as well to ensure nothing breaks there when building. You can easily switch in the RN-Tester by setting
newArchEnabled=falsein packages/rn-tester/android/app/gradle.properties - Tap around in a few screens after migrating (helps to ensure nothing is breaking at runtime)
List of files to migrate
- [x] react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java assigned to @nitinshukla413 https://github.com/facebook/react-native/pull/50693
- [x] react/views/text/frescosupport/FrescoBasedReactTextInlineImageSpan.java assigned to @gouravkhunger https://github.com/facebook/react-native/pull/50532
- [x] react/modules/blob/FileReaderModule.java assigned to @devanshsaini11 https://github.com/facebook/react-native/pull/50562
- [x] react/modules/blob/BlobProvider.java assigned to @JatinDream11 https://github.com/facebook/react-native/pull/50756
- [x] react/runtime/ReactLifecycleStateManager.java assigned to @rohitverma-d11 https://github.com/facebook/react-native/pull/50685
- [x] react/views/textinput/ReactEditTextInputConnectionWrapper.java assigned to @Q1w1N https://github.com/facebook/react-native/pull/50573
- [x] react/uimanager/ReactClippingViewGroupHelper.java assigned to @Priyanka26012 https://github.com/facebook/react-native/pull/50679
- [x] react/uimanager/ReactStylesDiffMap.java assigned to @poonamjain96 https://github.com/facebook/react-native/pull/50616
- [x] react/bridge/UiThreadUtil.java assigned to @riteshshukla04 #50536
- [x] react/bridge/DynamicFromObject.java assigned to @yasir6jan https://github.com/facebook/react-native/pull/50754
- [x] react/bridge/DynamicFromArray.java assigned to @BogiKay https://github.com/facebook/react-native/pull/50602
- [x] react/bridge/DynamicFromMap.java assigned to @artus9033 https://github.com/facebook/react-native/pull/50597
- [x] react/bridge/JavaScriptModuleRegistry.java assigned to @gustavoabel
- [x] react/bridge/JSBundleLoader.java assigned to @yogeshpaliyal https://github.com/facebook/react-native/pull/50911
- [x] react/bridge/Inspector.java assigned to @Vin-Xi https://github.com/facebook/react-native/pull/50947
- [x] react/uimanager/ViewGroupManager.java assigned to @riteshshukla04 https://github.com/facebook/react-native/pull/50895
- [ ] react/bridge/BaseJavaModule.java assigned to @l2hyunwoo https://github.com/facebook/react-native/pull/51207
- [ ] react/LazyReactPackage.java assigned to @Xintre https://github.com/facebook/react-native/pull/51085
- [x] react/bridge/JavaModuleWrapper.java assigned to @DrRefactor https://github.com/facebook/react-native/pull/50882
Let's go 🚀
I would like to migrate: react/modules/blob/FileReaderModule.java
I would like to migrate react/modules/blob/BlobProvider.java
I would like to migrate react/bridge/DynamicFromObject.java
I would like to migrate react/uimanager/ReactStylesDiffMap.java
I would like to migrate react/views/textinput/ReactEditTextInputConnectionWrapper.java
I'd like to migrate react/bridge/DynamicFromArray.java
Hello, I'd like to migrate react/bridge/DynamicFromMap.java
Edit: tracked in #50597
Hello, I'd like to migrate react/runtime/ReactLifecycleStateManager.java
Hi @mateoguzmana I could help with react/views/text/frescosupport/FrescoBasedReactTextInlineImageSpan.java
Can you assign me this @mateoguzmana react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java
Can you assign me this @mateoguzmana react/uimanager/ReactClippingViewGroupHelper.java
Thanks all for the interest so far! All the files have been assigned now. Let us know if you run into issues
@mateoguzmana Hello, if any file remains pending, please assign it to me.
PR for Kotlin-ify react/runtime/ReactLifecycleStateManager.java
https://github.com/facebook/react-native/pull/50685
@mateoguzmana PR for Kotlin-ify react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java
https://github.com/facebook/react-native/pull/50693
@rshest @mateoguzmana I have resolved the comments for https://github.com/facebook/react-native/pull/50693 , Can you check?
Hi @JatinDream11 @yasir6jan, just checking in — could you share an update on your files? Otherwise, we’ll go ahead and release them.
Hi @mateoguzmana I am working on this and will be raising the PR by tomorrow.
Hello, I wanted to contribute to React Native from a long time, looks like this can be a good start.
Please assign me any files we want to migrate to kotlin.
Hi,
If the migration for this file becomes available, react/modules/blob/BlobProvider.java, or any other file.
I would love to pick a file to migrate.
Hi, I am currently busy with some urgent work. I will complete the migration of react/modules/blob/BlobProvider.java by thursday
Hi @mateoguzmana I have raised the PR but I am getting some conflicts, resolving those https://github.com/facebook/react-native/pull/50754
Hi @mateoguzmana I have raised the PR #50756
Thanks everyone for the participation! We decided to add a few more for those who showed interest in helping out with migrating a file. Files assigned to @gustavoabel, @yogeshpaliyal, @Vin-Xi & @riteshshukla04.
Thank you @mateoguzmana
@mateoguzmana Thank you! Happy to help with the migration 🙌
Hello @mateoguzmana, I'd like to migrate BaseJavaModule.java
Hello @mateoguzmana I would like to migrate react/LazyReactPackage.java