datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Add support for the new architecture

Open capezzbr opened this issue 2 years ago β€’ 9 comments

Was wondering if you had plans to add support for the new Fabric renderer

capezzbr avatar Jun 15 '22 01:06 capezzbr

Hello, Thanks for asking. Yes, the new renderer will be supported but I cannot give a specific time line. I think I want to wait for RN 0.70 to be stable before I start this. If anyone wants to support this, sponsorships are open :) Thank you πŸ™‚

vonovak avatar Jun 21 '22 21:06 vonovak

@vonovak thanks for following up! I know it's hard to provide a timeline, but it believe this would help folks relying on this library that want to enable Fabric πŸ™‡

capezzbr avatar Jun 22 '22 23:06 capezzbr

Will this work also include turbomodule support? If so, can we change the issue title?

tom-sherman avatar Jun 23 '22 08:06 tom-sherman

Hey guys,

I can help with that. What is the current status of this issue? Has anyone already started?

BrunoVillanova avatar Sep 02 '22 21:09 BrunoVillanova

Hey, I just started today on supporting Fabric for iOS.

alfonsocj avatar Sep 02 '22 23:09 alfonsocj

Awesome! Please tell me if you need some help. ☺️ On 2 Sep 2022 20:46 -0300, Alfonso Curbelo @.***>, wrote:

Hey, I just started today on supporting Fabric for iOS. β€” Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

BrunoVillanova avatar Sep 03 '22 00:09 BrunoVillanova

PR in review https://github.com/react-native-datetimepicker/datetimepicker/pull/657

capezzbr avatar Sep 19 '22 15:09 capezzbr

reopening since android is still pending

vonovak avatar Sep 29 '22 21:09 vonovak

I think the example is the one not compatible. I'll investigate further.

alfonsocj avatar Oct 03 '22 15:10 alfonsocj

HEY, I HAVE DONE MY PROJECTS ON REACT NATIVE WHERE I INNOVATE AND ADD NEW FEATURES, CAN YOU GIVE ME A CHANCE SO THAT I ADD A NEW ARCHITECTURE?

ShrutiRani7029 avatar Oct 16 '22 10:10 ShrutiRani7029

Is there any update about implementing Fabric support for Android?

EkaterinaMozheiko avatar Oct 18 '22 12:10 EkaterinaMozheiko

Is there any update about implementing Fabric support for Android?

+1

HarshaR1642 avatar Oct 23 '22 12:10 HarshaR1642

Hello, the android part of this module does not really render anything in react native, and therefore android will not need to support Fabric because it will never use Fabric. However, we will need to support the new turbomodules. I'm planning to add turbomodules support to another module I maintain and then add the support here. My timeline is that I'll prob start in ~1.5 months. ~~If anyone wants to do that before, please let us know here and go ahead!~~ πŸ‘ @ShrutiRani7029

update: android migration is in progress

vonovak avatar Oct 25 '22 09:10 vonovak

Also, if you are experiencing an issue building your Android app with the new architecture enabled on RN 0.70, you should add this snippet of code to your react-native.config.js

module.exports = {
  dependencies: {
    ...
    // https://github.com/react-native-community/cli/blob/0e63e750a235062cd9bc43ed6a4a2beb8f14385a/docs/autolinking.md#how-can-i-disable-autolinking-for-new-architecture-fabric-turbomodules
    '@react-native-community/datetimepicker': {
      platforms: {
        android: {
          libraryName: null,
          componentDescriptors: null,
          androidMkPath: null,
          cmakeListsPath: null,
        },
      },
    },
  },

the issue from my understanding is that @react-native-community/datetimepicker doesn't have any Android UI components that needs to be autolinked, but RN CLI does detect what is defined in the module package.json, which are only for iOS. I believe a better workaround would be to created a react-native.config.js in the @react-native-community/datetimepicker, that does the above. ~~I am happy to open a PR with this fix soon~~ I am not sure if we can fix this at the library level, the fix might need to be applied at the app level

capezzbr avatar Oct 25 '22 16:10 capezzbr

Also, if you are experiencing an issue building your Android app with the new architecture enabled on RN 0.70, you should add this snippet of code to your react-native.config.js

module.exports = {
  dependencies: {
    ...
    // https://github.com/react-native-community/cli/blob/0e63e750a235062cd9bc43ed6a4a2beb8f14385a/docs/autolinking.md#how-can-i-disable-autolinking-for-new-architecture-fabric-turbomodules
    '@react-native-community/datetimepicker': {
      platforms: {
        android: {
          libraryName: null,
          componentDescriptors: null,
          androidMkPath: null,
          cmakeListsPath: null,
        },
      },
    },
  },

the issue from my understanding is that @react-native-community/datetimepicker doesn't have any Android UI components that needs to be autolinked, but RN CLI does detect what is defined in the module package.json, which are only for iOS. I believe a better workaround would be to created a react-native.config.js in the @react-native-community/datetimepicker, that does the above. I am happy to open a PR with this fix soon

Hi @capezzbr I added your temporary fix and tried but it is not working, still facing the same issue with android

HarshaR1642 avatar Nov 01 '22 16:11 HarshaR1642

@HarshaR1642 what exactly is the error you are experiencing

capezzbr avatar Nov 01 '22 20:11 capezzbr

DatePicker is not rendering on Android. On iOS Simulator it works fine. I am on RN 0.70.6.

Josh2941 avatar Feb 13 '23 15:02 Josh2941

f interested I have achieved this functionality for new architecture using fabric https://www.youtube.com/watch?v=W3m-8_QuC14&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=4 and https://www.youtube.com/watch?v=38dpw_s2YKE&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=3

BraveEvidence avatar Feb 24 '23 09:02 BraveEvidence

update: the android support is happening here: https://github.com/react-native-datetimepicker/datetimepicker/pull/730

vonovak avatar Mar 08 '23 22:03 vonovak

closed via #730 πŸŽ‰

vonovak avatar Mar 19 '23 09:03 vonovak