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/Migrate to Vue 3 #192

Open
WadeBarnes opened this issue Aug 31, 2023 · 3 comments
Open

Upgrade/Migrate to Vue 3 #192

WadeBarnes opened this issue Aug 31, 2023 · 3 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@WadeBarnes
Copy link
Member

Vue 2 reaches EOL on December 31st, 2023

Details here

@amanji amanji self-assigned this Apr 27, 2024
@amanji amanji moved this to Assigned in CDT Enterprise Apps Apr 27, 2024
@amanji amanji moved this from Assigned to In Progress in CDT Enterprise Apps Apr 28, 2024
@amanji
Copy link
Collaborator

amanji commented Apr 28, 2024

I worked on this for a bit and there a large number of breaking changes that need to be accounted for:

  1. Vue 3 does not actively support or recommend class components anymore. They recommend the more favourable functional components through the Composition API. This would require a change to every single component in OrgBook since we are dependent on class components (at the time these were a much cleaner way to define Vue 2 components)
  2. We are currently using the deprecated vue-property-decorator. I have not been able to get components to render correctly in Vue 3 with this. There is a community based project vue-facing-decorator, which is similar, but also requires changes to every component, since these newer decorators don't support Vuex very well. We would have to pull Vuex logic into the component body, which would require extensive testing to make sure things don't break.
  3. Vuetify would need to be updated and this could cause wide-spread effects.

Given the effort required for this, I would have to also ask what the long term support plans are for OrgBook? If we aim to support this long term then we may want to push through make the switch to Vue 3.

We must patch vulnerable packages and that was part of this current effort. I have moved to using Vite over Vue-CLI, which has not only considerably sped up build times, but has also resolved many of the package audit warnings. Doing so did not require any changes to application code, except for 4 Vuetify SASS styling overrides (which are related to the timeline and can be inlined directly into the component). I can draft a PR with the update to Vite for now if that works.

Tagging: @swcurran, @esune and @WadeBarnes for further input.

@amanji amanji added the dependencies Pull requests that update a dependency file label Apr 29, 2024
@amanji amanji moved this from In Progress to Blocked in CDT Enterprise Apps May 8, 2024
@amanji amanji moved this from Blocked to Assigned in CDT Enterprise Apps May 8, 2024
@amanji
Copy link
Collaborator

amanji commented May 8, 2024

There appear to be a lot of discrepancies between Vuetify 2 and 3 which is resulting in time required to adjust CSS application-wide. This will require more effort to fully upgrade.

@esune esune moved this from Assigned to Assignment Ready in CDT Enterprise Apps May 8, 2024
@esune esune unassigned amanji May 8, 2024
@Gavinok Gavinok self-assigned this Nov 12, 2024
@Gavinok Gavinok moved this from Assignment Ready to In Progress in CDT Enterprise Apps Nov 13, 2024
@Gavinok
Copy link
Contributor

Gavinok commented Nov 19, 2024

Here are the current plans for changes

Migration While still using Vue 2

  • Migrate to vite
  • Migrate to Pinia from Vuex
  • Remove as many blockers while still using vue2
    • A. can be premigrated in vue2

      • cross-compatible
      • can be drop in replaced
      • e.g.
        • vue-property-decorator
    • B. have a separate vue 3 version

      • clear upgrade path
      • declares compatConfig
      • e.g.
        • vuex (Dropped for pinia)
        • vue-router
  • Use ESLint plugin vue to catch depreciated things in vue 2 that will make migration difficult
  • Begin migrating components from class based to functional

Upgrade to Vue and Vuetify 3

  • Install vue/compat which should support a lot of the

  • And upgrade to vuetify 3 (likely to take a while)

  • And begin migrating components to the new vuetify version

  • Currently 51 components will need to be migrated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Status: In Progress
Development

No branches or pull requests

3 participants