-
Notifications
You must be signed in to change notification settings - Fork 62
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
Move to Vue 3 #526
Move to Vue 3 #526
Conversation
https://v3.vuejs.org/guide/migration/vnode-lifecycle-events.html We still need to account for hook:beforeDestroy events, which we will do later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes from review through 427f100
vue-password-strength-meter does not currently support Vue 3. We are planning to add back the password strength meter next release.
- <i18n> was renamed to <i18n-t>. - The `path` prop was renamed to `keypath`. - Where the `tag` prop was omitted before, specify 'span'. - Where the `tag` prop was `false` before, omit the prop. - Use the `plural` prop instead of $tcPath(). https://vue-i18n.intlify.dev/guide/migration/breaking.html#translation-component https://vue-i18n.intlify.dev/guide/migration/features.html#translation-component
Using console.error() in testing and console.log() in production/development. console.log() seems to log more information than console.error() in Chrome, which is why we don't also use console.error() in production/development.
There are also now no longer any mixin factories.
This is needed because App used $once('hook:beforeDestroy'): https://v3.vuejs.org/guide/migration/events-api.html
One significant change is that data is now reconciled whenever it is modified, not just after a request. Also closes #317.
I've been able to extract many of these commits into separate PRs compatible with our Vue 2 codebase. I'm continuing to do so, and once that's done, I'll create a new PR with the smaller set of commits that absolutely won't work in Vue 2. I don't think it makes sense to reuse this PR for that smaller set of commits, so I'll go ahead and close this PR. I'm putting together a summary of all the PRs related to Vue 3 in #565, and once that's done, that'll be the best place to go to understand the different aspects of the move to Vue 3. I'm also going to go ahead and map each commit here to the PR or commit it was ultimately moved to. That's mostly useful just as a way to plan for the PRs to come: again, to learn about how the migration actually unfolded, see #565. If I remember correctly, @ktuite and I reviewed through 4f16351.
|
In this PR, we migrate from Vue 2 to Vue 3. There are some big changes (for example, no more Vuex store!), but most components and tests saw only small changes.
For the record, the order of commits here does not reflect the actual order of my work: I have tried to group the commits thematically. Each commit should reflect a single change, but many changes were needed to move to Vue 3, so tests don't start passing until the final commits. I have tried to organize the commits so that it will be easier for us to look back on these changes. However, the end result was my first priority, and there are places where changes have ended up in the wrong commit. (I will note these as I notice them.) I force-push below, but I didn't overwrite a commit once it was reviewed.
The commits are organized along the following broad changes:
requestData
is organized is much clearer now.unsavedChanges
object might be the only exception.)requestData
can be configured to log all changes in order to facilitate debugging.requestData
and sending a request usinguseRequests()
/mixinRequests
. Both now use the new genericrequest()
function.reconcileData
mechanism: we can simply use the reactivity API.There are other one-off changes below, but the ones above are probably the most important.