danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
140 stars 60 forks source link

Upgrade to ng 13 #141

Closed danielmoncada closed 2 years ago

danielmoncada commented 2 years ago

Currently, the library supports applications that run on ng 13, but the library itself still contains old ng dependencies. This is to upgrade fully to ng 13.

This includes:

renemadsen commented 2 years ago

@danielmoncada I belive I have fixed it to work with ng 13, but please do check it out, before we do a PR for the changes.

https://github.com/microting/date-time-picker/actions

I removed the references to older angular versions, since it was making my build proces spit random errors, since the upgrade to ng 13.

danielmoncada commented 2 years ago

@renemadsen thanks, appreciate the work. I will take a look at it this weekend

POFerro commented 2 years ago

Hi guys :),

I've updated my reference to version 13 of this library and it's still being built using View Engine instead of native Ivy, is this issue going to address that upgrade also?

Thanks POFerro

BBanoth commented 2 years ago

@danielmoncada , I am too getting the warning saying the package is built using View Engine

vn93ksatria commented 2 years ago

@danielmoncada do you have the moment version?

Rlcolli4 commented 2 years ago

I am able to run this in Angular 13 but I am still getting the warning as well @BBanoth. Any update on what is causing this or what we may need to change to prevent it from happening?

mhamern commented 2 years ago

@Rlcolli4 It is caused by this line. The library is still build by the View Engine for backwards.

You can read more here

krusche commented 2 years ago

any update on this issue? when can we expect a version which is fully compatible with Angular 13? Thanks!

danielmoncada commented 2 years ago

@krusche I just spent the last few hours creating a new version without the MomentAdapter and closing some other small defects..

The issue here is if I don't allow View Engine, then it won't be backwards compatible anymore and that may break a lot of people's projects on older versions of Angular.

I could maintain two separate branches, but that's always a pain, cherry-picking issues to/from branches.

What type of compatibility / Ng13 functionality are you looking for? I am wondering if there are any backwards compatibility solutions I can work with.

krusche commented 2 years ago

I would suggest to release a new major version that only supports Angular 13 with Ivy and which completely drops View Engine. This is how other libraries handle it as well and I believe this is also what the Angular team has in mind. Supporting both will be difficult and might even become more difficult in the future.

In case of important bugfixes, you could still integrate them into older releases if there is a request from the community, but I guess more and more projects will migrate to Ivy only in the near future.

We have migrated our project https://github.com/ls1intum/Artemis to dayjs because momentjs is a legacy project in maintenance mode (see https://momentjs.com/docs/#/-project-status), so we won't mind if the MomentAdapter is dropped completely.

I took some time over the holidays to remove all "legacy" libraries in https://github.com/ls1intum/Artemis which are not maintained anymore to increase compatibility with Angular 13, but I would really love to keep date-time-picker 👍

danielmoncada commented 2 years ago

@krusche yeah, I was thinking that too.. I'm assuming that's the only feasible way to handle this issue.

Also, the MomentJs adapter has already been removed and extracted in the latest version. I'll go ahead and make a DayJs one as well.

krusche commented 2 years ago

Just saw that we have a custom component which does the conversion: https://github.com/ls1intum/Artemis/blob/develop/src/main/webapp/app/shared/date-time-picker/date-time-picker.component.ts

So we would not need a DayJsAdapter

krusche commented 2 years ago

any updates on the Angular 13 upgrade?

Rlcolli4 commented 2 years ago

@danielmoncada if it makes you feel better, npmjs.org does allow users to install older versions of the package if they do not want to run the newest version of Angular.

Also any updates on the progress of this upgrade?

danielmoncada commented 2 years ago

@krusche and @Rlcolli4 i can try to work on it this weekend. I've been busy with my 'real' job =]

@Rlcolli4 thanks, yeah I know that about NPM. the plan is to have a fully supported NPM package (with a new major version) for this.

Mekacher-Anis commented 2 years ago

@danielmoncada any updates on this ? and thank you for doing this awesome job of maintaining the library, it's heroes like you that keep the world running !! let me know if you need help with the update. Imho version 13 should already be the new major version with the breaking changes if there are any, so there's no need for version 14. That way the library will stay consistent to the angular versioning.

q-garethallenstringer commented 2 years ago

If it's a blocker, I don't believe it would be a problem to release a v14 as this is what @ngx-translate/core has done

danielmoncada commented 2 years ago

hey everyone.. I've updated it to support full ng13. Version 14.0.1 is out on npm now. sorry for the delay.