Hi Philipp, yes, I also think it makes sense to get rid of the AngularJS components in the, let's say, mid-term future ;-) The next component which we can replace is the new live dashboard which I'm currently working on.
I think we currently have the following modules that are still written in AngularJS 1.x, ordered by my personal estimation of effort from low to high: - My Elements (although I think we can merge this component with the pipeline element installation module) - Pipeline Element Installation - Notifications (needs refactoring anyways, I plan to work on this once the dashboard is complete) - Pipeline Overview - Pipeline Editor Already on Angular 2+/9 are: - Home - Info - Connect - Configuration - (almost) the new dashboard - Data explorer ...and then there are dozens (maybe > 100) services and other helper modules which also would need to be migrated. So if there is anyone who would like to refactor some legacy AngularJS code to Angular 9, this would be awesome! Dominik -----Original Message----- From: Philipp Zehnder <[email protected]> Sent: Monday, February 17, 2020 10:19 PM To: [email protected] Subject: Re: UI Angular Upgrade Hi Dominik, your changes are awesome. I tested it today and it feels much much faster than before. What do you think how much effort will it be to remove all AngularJS code and which component do you think could we migrate next? Philipp > On 17. Feb 2020, at 11:20, Dominik Riemer <[email protected]> wrote: > > Hi all, > > I've pushed a commit that upgrades the Angular version from 7 to 9. > At the same time, I've optimized the UI build process a bit: > - Ahead-of-time compilation is activated > - Optimizations (e.g., JS minification) are turned on > - I switched the default build tool from custom webpack to angular-cli > and modified the startup scripts in the package.json, so that "npm > start" now triggers "ng serve" and "npm build" now triggers ng build. > There is still a fallback to use the old custom webpack config by > running npm start-webpack, once everything works, we can remove this later. > > The changes should reduce the resulting JS bundle size quite > significantly (~6MB for the whole bundle). > > However, I had to change quite a few things to get this working, e.g., > old AngularJS modules had to be prepared for minification, > incompatible libraries etc. I also turned on strictDi for AngularJS > modules to better discover issues in the future. > So although I checked and most things seem to work as expected, I'm > quite sure we'll find some new bugs after this upgrade (Angular 9 now > uses Ivy unter the hood, see > https://angular.io/guide/ivy-compatibility). It would be great if you > could check the whole UI to see if there's any unexpected behavior. > > At least one open issue I've discovered: > - there's an open issue with plotly.js and Angular 9 (see > https://github.com/plotly/angular-plotly.js/issues/75) , I changed the > Plotly module to PlotlyViaCDNModule, but have not yet checked if this > is working now > > Just reply to this mail in case you find any other issues! > > Dominik > > > > > >
