react-native icon indicating copy to clipboard operation
react-native copied to clipboard

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

Open mateoguzmana opened this issue 8 months ago • 49 comments

☂️ 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

mateoguzmana avatar Apr 07 '25 10:04 mateoguzmana

Let's go 🚀

cortinico avatar Apr 07 '25 10:04 cortinico

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

devanshsaini11 avatar Apr 07 '25 12:04 devanshsaini11

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

JatinDream11 avatar Apr 07 '25 12:04 JatinDream11

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

yasir6jan avatar Apr 07 '25 12:04 yasir6jan

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

poonamjain96 avatar Apr 07 '25 12:04 poonamjain96

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

BogiKay avatar Apr 07 '25 14:04 BogiKay

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

Edit: tracked in #50597

artus9033 avatar Apr 07 '25 14:04 artus9033

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

rohitverma-d11 avatar Apr 07 '25 16:04 rohitverma-d11

react/bridge/UiThreadUtil.java

Can you assign me this @mateoguzmana

riteshshukla04 avatar Apr 07 '25 16:04 riteshshukla04

Can you assign me this @mateoguzmana react/uimanager/ReactClippingViewGroupHelper.java

Priyanka26012 avatar Apr 07 '25 16:04 Priyanka26012

Thanks all for the interest so far! All the files have been assigned now. Let us know if you run into issues

mateoguzmana avatar Apr 07 '25 16:04 mateoguzmana

@mateoguzmana Hello, if any file remains pending, please assign it to me.

gustavoabel avatar Apr 08 '25 14:04 gustavoabel

PR for Kotlin-ify react/runtime/ReactLifecycleStateManager.java

https://github.com/facebook/react-native/pull/50685

rohitverma-d11 avatar Apr 13 '25 08:04 rohitverma-d11

@mateoguzmana PR for Kotlin-ify react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java

https://github.com/facebook/react-native/pull/50693

nitinshukla413 avatar Apr 14 '25 05:04 nitinshukla413

@rshest @mateoguzmana I have resolved the comments for https://github.com/facebook/react-native/pull/50693 , Can you check?

nitinshukla413 avatar Apr 14 '25 13:04 nitinshukla413

Hi @JatinDream11 @yasir6jan, just checking in — could you share an update on your files? Otherwise, we’ll go ahead and release them.

mateoguzmana avatar Apr 14 '25 15:04 mateoguzmana

Hi @mateoguzmana I am working on this and will be raising the PR by tomorrow.

yasir6jan avatar Apr 14 '25 16:04 yasir6jan

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.

yogeshpaliyal avatar Apr 14 '25 19:04 yogeshpaliyal

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.

Vin-Xi avatar Apr 15 '25 14:04 Vin-Xi

Hi, I am currently busy with some urgent work. I will complete the migration of react/modules/blob/BlobProvider.java by thursday

JatinDream11 avatar Apr 15 '25 14:04 JatinDream11

Hi @mateoguzmana I have raised the PR but I am getting some conflicts, resolving those https://github.com/facebook/react-native/pull/50754

yasir6jan avatar Apr 16 '25 08:04 yasir6jan

Hi @mateoguzmana I have raised the PR #50756

JatinDream11 avatar Apr 16 '25 09:04 JatinDream11

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.

mateoguzmana avatar Apr 23 '25 17:04 mateoguzmana

Thank you @mateoguzmana

yogeshpaliyal avatar Apr 23 '25 17:04 yogeshpaliyal

@mateoguzmana Thank you! Happy to help with the migration 🙌

gustavoabel avatar Apr 23 '25 17:04 gustavoabel

Hello @mateoguzmana, I'd like to migrate BaseJavaModule.java

migueldaipre avatar Apr 23 '25 17:04 migueldaipre

Hello @mateoguzmana I would like to migrate react/LazyReactPackage.java

Xintre avatar Apr 23 '25 18:04 Xintre