-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migration to Vue 3 #13
Comments
🚀 Vue 3 🚀I think this is only a library issue, because as soon as those are available apps can migrate whenever they want.
The password confirmation should normally not be important as no components are exported, this should be framework agnostic. The same I think is possible for the dialogs library. I also do not think we need to care too much about keeping changes small, we do not do this when we do other major changes. Especially as there is quite few activity once a new major is release.
💯 I agree! This is rather bigger issue as I think those APIs should all be fully framework agnostic. |
That is exactly what is implemented in the linked PR. Caveats: changing bundle size from 29.64 kB to 833.74 kB |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Nope, this requires building in post-install... |
Vue 3 Migration
Vue 2 EOL is 31 Dec 2023. Vue 3 migration is required.
Nextcloud Libraries overview
main
yet@nextcloud/upload
Nextcloud Apps overview
Proposal for libraries
Supporting to separated versions for Vue 2 and Vue 3 is complicated in the long run.
main
)cost
Option 1: Forward-compatibility
To make migration simple, we may develop new major versions with forward compatibility from the previous version.
Ideally migrating to a new major version should be as simple as changing the version number in the
package.json
.To archive this, we need to:
Then migrating to a new version is:
Option 2: demi-support
In some cases, the difference between Vue 2 and Vue 3 versions are minimal (mostly dependencies).
In theory, it is possible to build/publish both from the same source via:
@nextcloud/eslint-config
Note about apps public API relying on Vue
Some apps (e.g. viewer, workflowengine) have extension API via Vue components. This means that a Vue component from one
app (with one Vue library) is used in a Vue-component tree in another app (with another Vue library).
In general case, it is not supported by Vue. Even with Vue 2 apps it may not work without Module Federations. It will
not work with Vue 2 + Vue 3 mix at all.
Example: nextcloud-libraries/nextcloud-vue#6360
Explanation
Vue is stateful, and its rendering implementation uses Vue internal state.
In this case, we have Vue.js framework twice in the document. It would be fine if they are used in different, separated
apps, rendering different nodes.
But in the Workflow app,
<ConvertToPdf>
and<NcSelect>
component instances are rendered byVue_1
module while theyactually include and use
Vue_2
.During the rendering:
Vue_1
creates<NcSelect>
component instance and sets it as thecurrentInstance
Vue_2
checksgetCurrentInstance
and has nothing.Vue_2
doesn't render anything.In the past it worked at chance, because:
Alternatives:
Some for other APIs, like exposing Vue Router instance or store as a public API.
Migration guide for Nextcloud Apps
How to prepare for the migration
TBC
How to migrate
TBC
The text was updated successfully, but these errors were encountered: