Skip to content
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

Upgrade Nativescript 7.0 to 8.0 (including other dependencies) #39

Closed
RoiJS opened this issue May 2, 2021 · 17 comments · Fixed by #143
Closed

Upgrade Nativescript 7.0 to 8.0 (including other dependencies) #39

RoiJS opened this issue May 2, 2021 · 17 comments · Fixed by #143
Assignees
Labels
enhancement New feature or request technical task regular instructions
Projects

Comments

@RoiJS
Copy link
Owner

RoiJS commented May 2, 2021

Recently, the nativescript framework has been upgraded to version 8.0 https://blog.nativescript.org/nativescript-8-announcement/.

I think we have to make the necessary upgrade on the app as well but we will wait until the latest version will become stable (in couple of months maybe). I know nativescript community releases major version every 6 months, not really sure though, I need to research more about this.

I suggest to do more research how to upgrade the nativescript version to the latest one used by the app and also don't forget to check other dependencies' version.

@RoiJS RoiJS created this issue from a note in Reserbiz (To Do) May 2, 2021
@RoiJS RoiJS self-assigned this May 2, 2021
@RoiJS RoiJS added enhancement New feature or request technical task regular instructions labels May 2, 2021
@RoiJS RoiJS moved this from To Do to Backlog in Reserbiz May 2, 2021
@RoiJS RoiJS added this to the August Update Improvements milestone Aug 12, 2021
@RoiJS RoiJS moved this from Backlog to Ready for Development in Reserbiz Aug 12, 2021
@RoiJS RoiJS moved this from Ready for Development to In Progress in Reserbiz Aug 14, 2021
@RoiJS
Copy link
Owner Author

RoiJS commented Aug 14, 2021

This is the official blog post about upgrading the Angular version to 12. https://blog.nativescript.org/nativescript-angular-12/index.html

@RoiJS
Copy link
Owner Author

RoiJS commented Aug 14, 2021

Update Angular Version refer to this page https://www.npmjs.com/package/@angular/cli#updating-angular-cli

@RoiJS
Copy link
Owner Author

RoiJS commented Aug 14, 2021

Use this reference to check the node compatibility version with angular https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

@RoiJS
Copy link
Owner Author

RoiJS commented Aug 22, 2021

The current version of @nativescript/schematics which is responsible for code sharing feature is not yet updated to support angular version 12 and nativescript core 8. Its hard to manually update the version. I think we have to wait until the @nativescript/schematics plugin is updated.

@RoiJS RoiJS moved this from In Progress to Backlog in Reserbiz Aug 22, 2021
@RoiJS RoiJS moved this from Backlog to In Progress in Reserbiz Aug 22, 2021
@RoiJS
Copy link
Owner Author

RoiJS commented Aug 22, 2021

Another solution to be able to proceed with the upgrade is to convert the reserbiz project to the regular nativescript project, the one without code sharing feature. Besides I don't think I will create a web version of the Resebiz. Only Android and iOS versions. For now, I will try this solution.

@RoiJS RoiJS removed this from the August Update Improvements milestone Aug 23, 2021
@RoiJS RoiJS moved this from In Progress to Backlog in Reserbiz Aug 24, 2021
@RoiJS RoiJS moved this from Backlog to Ready for Development in Reserbiz Oct 17, 2021
@RoiJS
Copy link
Owner Author

RoiJS commented Jan 7, 2022

Unfortunately, the @nativescript/schematics has been deprecated https://www.npmjs.com/package/@nativescript/schematics. This means, the best solution that I have is to proceed with the solution from the previous comment.

@RoiJS
Copy link
Owner Author

RoiJS commented Apr 10, 2022

Instead of trying to convert the current project to a non-shared version of Nativescript, I decided to create a new fresh nativescript application and start migrating files from the old project to this new project. To be honest, It will take some time to fully migrate the entire application. As much as possible, document all steps pertaining to the migration process.

@RoiJS
Copy link
Owner Author

RoiJS commented Apr 10, 2022

Found an issue on @nativescript/firebase plugin. See thread EddyVerbruggen/nativescript-plugin-firebase#1873.

@RoiJS
Copy link
Owner Author

RoiJS commented May 10, 2022

@RoiJS
Copy link
Owner Author

RoiJS commented May 22, 2022

The application is now running!

There are still issues on other pages. These things need to be documented and fixed.

@RoiJS
Copy link
Owner Author

RoiJS commented May 22, 2022

Looks like Tabs component is no longer supported on the version 8 of nativescript. This needs to be replaced by TabView component instead https://docs.nativescript.org/ui-and-styling.html#tabview

@RoiJS
Copy link
Owner Author

RoiJS commented Jun 8, 2022

I have discovered some other issues that arises after the migration to the new version and these are the following:

alert(title: string, message: string, onClickEvent?: () => void) {
// const alertOptions: DialogOptions = {
// dialogStyle: CFAlertStyle.BOTTOM_SHEET,
// title: title,
// message: message,
// backgroundBlur: true,
// cancellable: true,
// buttons: [
// {
// text: ButtonOptions.OKAY,
// buttonStyle: CFAlertActionStyle.POSITIVE,
// buttonAlignment: CFAlertActionAlignment.END,
// textColor: '#FFFFFF',
// backgroundColor: '#eb5a2e',
// onClick: function () {
// if (onClickEvent) {
// onClickEvent();
// }
// },
// },
// ],
// };
// this._cfalertDialog.show(alertOptions);
}

confirm(title: string, message: string) {
// const confirmOptions: DialogOptions = {
// dialogStyle: CFAlertStyle.BOTTOM_SHEET,
// title: title,
// message: message,
// buttons: [
// {
// text: ButtonOptions.YES,
// buttonStyle: CFAlertActionStyle.POSITIVE,
// backgroundColor: '#eb5a2e',
// buttonAlignment: CFAlertActionAlignment.JUSTIFIED,
// onClick: function () {},
// },
// {
// text: ButtonOptions.NO,
// buttonStyle: CFAlertActionStyle.NEGATIVE,
// backgroundColor: '#D7D7D7',
// buttonAlignment: CFAlertActionAlignment.JUSTIFIED,
// onClick: function () {},
// },
// ],
// };
// return this._cfalertDialog.show(confirmOptions);
return of(confirm(message) ? ButtonOptions.YES : ButtonOptions.NO);

bandicam.2022-06-08.18-58-06-848.mp4
  • Another nativescript-ui-dataform related problem. There seems to be a problem with Switch , any form where this control exists makes the app crashes.

@RoiJS
Copy link
Owner Author

RoiJS commented Jun 17, 2022

I'm done refactoring dialog.service.ts file. I have instead use https://docs.nativescript.org/interaction.html#dialogs for both alert and confirm dialogs.

@RoiJS
Copy link
Owner Author

RoiJS commented Jun 17, 2022

The missing payload property on https://www.npmjs.com/package/@nativescript/local-notifications is now fixed. I have upgraded the version to @6.0.0.

@RoiJS
Copy link
Owner Author

RoiJS commented Aug 6, 2022

I have started refactoring some places which uses nativescript-ui-dataform. I decided to replace it with angular reactive forms. So far, I'm almost done refactoring the add term details form.

@RoiJS
Copy link
Owner Author

RoiJS commented Oct 5, 2022

At this moment, I have decided to not continue replacing the nativescript-dataform with angular reactive forms. Since the problem only exists with Switch control, I instead replaced all Switch control with Picker control with Yes and No options.

@RoiJS RoiJS linked a pull request Oct 6, 2022 that will close this issue
@RoiJS RoiJS closed this as completed in #143 Oct 6, 2022
Reserbiz automation moved this from Ready for Development to Done Oct 6, 2022
@RoiJS
Copy link
Owner Author

RoiJS commented Oct 6, 2022

At this moment, I could say that the migration of the app from using the code sharing structure to the Nativescript standard project structure is now completed! Moving this issue to close now.

@RoiJS RoiJS reopened this Oct 6, 2022
Reserbiz automation moved this from Done to Ready for Development Oct 6, 2022
@RoiJS RoiJS closed this as completed Oct 6, 2022
Reserbiz automation moved this from Ready for Development to Done Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical task regular instructions
Projects
Development

Successfully merging a pull request may close this issue.

1 participant