Skip to content

☂️ Help us Kotlin-ify React Native - Round 3 #50513

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

Open
17 of 19 tasks
mateoguzmana opened this issue Apr 7, 2025 · 49 comments
Open
17 of 19 tasks

☂️ Help us Kotlin-ify React Native - Round 3 #50513

mateoguzmana opened this issue Apr 7, 2025 · 49 comments
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. ☂️ Umbrella To label issues that serve as coordination point and drivers for tasks in the react-native repo

Comments

@mateoguzmana
Copy link
Collaborator

mateoguzmana commented Apr 7, 2025

☂️ 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.: mMyAwesomeProperty should become myAwesomeProperty
  • 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=false in 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

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Apr 7, 2025
@mateoguzmana mateoguzmana removed Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Apr 7, 2025
@facebook facebook deleted a comment from react-native-bot Apr 7, 2025
@facebook facebook deleted a comment from react-native-bot Apr 7, 2025
@facebook facebook deleted a comment from react-native-bot Apr 7, 2025
@mateoguzmana mateoguzmana added ☂️ Umbrella To label issues that serve as coordination point and drivers for tasks in the react-native repo Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. labels Apr 7, 2025
@cortinico cortinico changed the title DRAFT – ☂️ Help us Kotlin-ify React Native tests - Round 3 ☂️ Help us Kotlin-ify React Native tests - Round 3 Apr 7, 2025
@cortinico cortinico pinned this issue Apr 7, 2025
@cortinico
Copy link
Contributor

Let's go 🚀

@devanshsaini11
Copy link
Collaborator

I would like to migrate: react/modules/blob/FileReaderModule.java

@JatinDream11
Copy link
Contributor

I would like to migrate react/modules/blob/BlobProvider.java

@yasir6jan
Copy link
Contributor

I would like to migrate react/bridge/DynamicFromObject.java

@poonamjain96
Copy link
Contributor

I would like to migrate react/uimanager/ReactStylesDiffMap.java

@mateoguzmana mateoguzmana changed the title ☂️ Help us Kotlin-ify React Native tests - Round 3 ☂️ Help us Kotlin-ify React Native - Round 3 Apr 7, 2025
@Q1w1N
Copy link
Contributor

Q1w1N commented Apr 7, 2025

I would like to migrate react/views/textinput/ReactEditTextInputConnectionWrapper.java

@BogiKay
Copy link
Contributor

BogiKay commented Apr 7, 2025

I'd like to migrate react/bridge/DynamicFromArray.java

@artus9033
Copy link
Contributor

artus9033 commented Apr 7, 2025

Hello, I'd like to migrate react/bridge/DynamicFromMap.java

Edit: tracked in #50597

@rohitverma-d11
Copy link
Contributor

Hello, I'd like to migrate react/runtime/ReactLifecycleStateManager.java

@riteshshukla04
Copy link
Contributor

riteshshukla04 commented Apr 7, 2025

react/bridge/UiThreadUtil.java

Can you assign me this @mateoguzmana

@gouravkhunger
Copy link
Contributor

Hi @mateoguzmana I could help with react/views/text/frescosupport/FrescoBasedReactTextInlineImageSpan.java

facebook-github-bot pushed a commit that referenced this issue Apr 24, 2025
Summary:
Rewrite of JavaModuleWrapper from Java to Kotlin in scope of #50513

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [CHANGED] - Migrated JavaModuleWrapper to Kotlin

Pull Request resolved: #50882

Test Plan:
Test RNTester using old arch. SampleLegacyModule is the one I've used, it needs to be enabled for old arch though (RNTesterApplication.kt -> getPackages & getReactModuleInfoProvider).

I may enable SampleLegacyModule for old arch to make testing easier. mateoguzmana
It breaks on `getDynamic` on old arch, but I could filter these from examples or add some fallback in SampleLegacyModule.kt for old arch.

Reviewed By: cortinico

Differential Revision: D73576099

Pulled By: javache

fbshipit-source-id: c940be27133258fa589571a600435fa478e6b51e
facebook-github-bot pushed a commit that referenced this issue Apr 25, 2025
Summary:
Rewrite of JSBundleLoader from Java to Kotlin in scope of #50513

## Changelog:
[ANDROID] [CHANGED] - Migrated JSBundleLoader to Kotlin

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: #50911

Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages

Reviewed By: cortinico

Differential Revision: D73649145

Pulled By: javache

fbshipit-source-id: 7ef1fc1ea1c53a8b914ae1aada1966e64b4c3d80
@l2hyunwoo
Copy link
Contributor

It seems that there are files that need to be migrated to Kotlin in ReactAndroid pacakge.
I would like to ask if it is possible to modify files that are not listed in the issue.

facebook-github-bot pushed a commit that referenced this issue Apr 28, 2025
Summary:
Rewrite of the Inspector class from Java to Kotlin in scope of #50513

## Changelog:
[ANDROID] [CHANGED] - Migrated Inspector to Kotlin

Pull Request resolved: #50947

Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages

Reviewed By: cortinico

Differential Revision: D73767386

Pulled By: javache

fbshipit-source-id: e0098568aa0ed9863503e206a88d3b171c8f9966
@deepak0001631
Copy link

Hi, let's contribute, any pending files please assign it to me.

@ObiwanKenobee

This comment has been minimized.

facebook-github-bot pushed a commit that referenced this issue Apr 29, 2025
Summary:
This PR aims to migrate ViewGroupManager to kotlin as part of #50513
## Changelog:
[ANDROID][CHANGED]Migrate ViewGroupManager to kotlin

Pull Request resolved: #50895

Test Plan: Tested with RN tester with old and new arch

Reviewed By: javache

Differential Revision: D73770843

Pulled By: cortinico

fbshipit-source-id: 45959a8bf512b3590ca8bc64dac281e13fa41ca3
@SGamrekelashvili
Copy link

Hello, if there will be anything just mention me, It would be a pleasure to contribute.

@yogeshpaliyal
Copy link
Contributor

Would be happy to pick other files in future if there are new files required the java to kotlin migration.

@Xintre
Copy link

Xintre commented May 2, 2025

Hi @mateoguzmana, I have raised a PR: #51085

@raghu1286
Copy link

Hi, I would like to contribute, pls assign to me any new files that require migration, thanks!

@rEhan0771
Copy link

Hi, is there any thing for me , let me know , i would like to contribute.

@mwx27
Copy link

mwx27 commented May 6, 2025

Hi, I am also eager to contribute

@migueldaipre
Copy link
Collaborator

Hey @mateoguzmana, You can pass on my task, I won't be able to do it. So sorry for not replying sooner!

@SGamrekelashvili
Copy link

@mateoguzmana i will do it if its possible

@mateoguzmana
Copy link
Collaborator Author

Hey @mateoguzmana, You can pass on my task, I won't be able to do it. So sorry for not replying sooner!

No problem at all, thanks for letting us know!

@l2hyunwoo, since you were first among the others who showed interest, I've re-assigned react/bridge/BaseJavaModule.java to you.

To everyone else — it's awesome to see so much interest! At the moment, we don’t have more files available for community contribution, but I’ll definitely try to bring this up and see if there is another initiative to get more folks involved somewhere in the future. :)

@shabeerv
Copy link

Hi,

I can pick the migration for this file react/LazyReactPackage.java as I can see it has no activity for the past week

@Xintre
Copy link

Xintre commented May 13, 2025

Hi @mateoguzmana, I have applied changes from cr: #51085

@gustavoabel
Copy link
Contributor

gustavoabel commented May 14, 2025

Hi @mateoguzmana JavaScriptModuleRegistry has already been migrated by @fabriziocucci , I didn't understand why he migrated without even having the file signed for him, but it's already done.

#51164

@fabriziocucci
Copy link
Contributor

Hey @gustavoabel, apologies for taking over the conversion of that particular file, it was definitely unintentional, I didn't notice it was assigned already! 🙏

@ai-dev-official
Copy link

Is this issue open? If yes, can I pick this up? Are there any specific guidelines or community I should follow?

@Josetic224
Copy link

I would love to work on this Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. ☂️ Umbrella To label issues that serve as coordination point and drivers for tasks in the react-native repo
Projects
None yet
Development

No branches or pull requests