dodona-edu / dolos

:detective: Source code plagiarism detection
https://dolos.ugent.be
MIT License
270 stars 33 forks source link

Refactor to Vue 3 & Composition API #754

Closed maartenvn closed 1 year ago

maartenvn commented 2 years ago

As Vue 2 is no longer actively maintained, besides security support until 23 september 2023, a refactor to Vue 3 must be made. Vue 3 also significantly improves performance and bundle size and offers much better DX with TypeScript.

Following refactors must be made:

I recommend we tackle this in 2 "phases":

Phase 1 will take the most development time as it requires a full rewrite/restructure of every component. Once Vuetify 3 is released, phase 2 will not be very time consuming.

maartenvn commented 2 years ago

The first refactor within Phase 1 will be switching to the compositation API.

I was unable to switch to Vite before switching from class-component as specific features are incompatible.

Within Phase 1 the order will be:

  1. Refactor to the Composition API & Pinia (using Vuex with the Composition API is very difficult and not worth the hastle of working in multiple steps)
  2. Refactor to Vite
maartenvn commented 2 years ago

With the upcoming release of Vue 2.7 we will take the step to 2.7 first, before upgrading to 3.0, as it backports most features from 3.0.

As of right now, we cannot upgrade to 2.7 because vuetify-loader doesn't support it yet (https://github.com/vuetifyjs/vuetify-loader/issues/240)

maartenvn commented 2 years ago

The refactor to Vite will be moved to Phase 2 because dev server performance is terrible with Vuetify 2. A dedicated Vite plugin for Vuetify 3 is available in alpha and should solve this issue, once we migrate to Vue 3.