kytos-ng / ui

Kytos Admin UI
MIT License
0 stars 3 forks source link

Define an incremental plan to upgrade towards Vue.js 3 #35

Closed viniarck closed 1 month ago

viniarck commented 1 year ago

Vue 2 will reach End of Life (EOL) on December 31st, 2023. After that date, Vue 2 will continue to be available in all existing distribution channels (CDNs and package managers), but will no longer receive updates, including security and browser compatibility fixes.

https://v2.vuejs.org/lts/

Objective

Define an incremental plan to upgrade towards Vue.js 3, just so ui core doesn't not accumulate technical debt and other vulnerabilities. ui is a core part of kytos-ng as a product, it's important for network operators. We don't necessarily need an full blown blueprint for this, having the discussion on this issue is sufficient.

At the moment, our goal is to try to maintain most of the ui functionality as it is, we don't immediately need new functionalities, better perf, TypeScript support from Vue3. So, when choosing and strategy let's keep that in mind, and then later on we also decide if it's worth trying to adopt the composition API over the options API.

This issue here is partly related to https://github.com/kytos-ng/kytos/issues/183, but we have reduced the scope to only deal with Vue 2 EOL situation.

Initial Information

As highlighted on Vue2 js website, the options are:

Is @vue/compat an option for us (do our dependencies break)? or should we go with the intermediary Vue 2.7 at least that's recommended?

cc'ing @rmotitsuki @Niehaus if you'd like to contribute to what strategy we should go for (other core members and contributors will also participate but if you'd like to lead the discussion and which approaches we should go for).

Barbara, thanks for initially brainstorming about overall strategies.

viniarck commented 1 year ago

Feb 10th meeting notes:

viniarck commented 1 year ago
viniarck commented 7 months ago

On 2024.1 the migration is expected to happen, regarding the plan @rmotitsuki will share with us. Feel free to consolidate it wherever its best, whether it's on a issue discussion or lightweight blueprint, thanks, Rogerio.

rmotitsuki commented 5 months ago

Vue3 - migration

For the first phase of migration to Vue3 Kytos will use Vue3 libraries with Vue2 compatibility. Most Vue2 code will work with warning messages.

https://v3-migration.vuejs.org/

Some libraries were replaced to be compatible with Vue3:

For debugging purposes, Kytos UI must be compiled using a new pre-production profile. $ npm run preprod

This profile will create a compiled webpacket file with debug mode enabled. Copy the ./dist/build.js into Kytos installation ./kytos/web-ui/dist/build.js to replace the production UI.

Kytos will display any compatibility warning/error messages in the browser log window. (press F12 to activate the developer window inside the browser)

The following NApps must be updated with the new UI:

The rest of the napps in this list will not be updated:

Usual NApps' code upgrades

Common UI code used in NApps that need to be changed for UI compatibility.