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

Vue 3 migration #138

Closed
pnutmath opened this issue Feb 26, 2021 · 16 comments
Closed

Vue 3 migration #138

pnutmath opened this issue Feb 26, 2021 · 16 comments
Labels
enhancement New feature or request

Comments

@pnutmath
Copy link

are you planning to support vue 3? @antoine92190

@pnutmath pnutmath added the enhancement New feature or request label Feb 26, 2021
@antoine92190
Copy link
Collaborator

antoine92190 commented Feb 26, 2021

Yes it’s planned. Not sure how difficult the migration is, so I cannot give any estimate yet

@antoine92190 antoine92190 changed the title Any plan for migrating to Vue 3 Vue 3 migration Feb 26, 2021
@pnutmath
Copy link
Author

I am in for Vue 3 migration @antoine92190

@antoine92190 antoine92190 added the help wanted Help from the community is appreciated label Mar 22, 2021
@antoine92190
Copy link
Collaborator

It is now possible to use this library with vue 3: https://github.com/antoine92190/vue-advanced-chat#use-in-a-vue-3-project
The usage is not perfect, but the library relies on other projects that are not migrated to vue 3 yet.
This should be soon available though: PeachScript/vue-infinite-loading#312
Until then, you can use this workaround.

@antoine92190 antoine92190 removed the help wanted Help from the community is appreciated label Aug 7, 2021
@antoine92190 antoine92190 pinned this issue Aug 7, 2021
@antoine92190 antoine92190 added the in progress This is currently being worked on label Aug 12, 2021
@rrolla
Copy link

rrolla commented Oct 23, 2021

It is now possible to use this library with vue 3: https://github.com/antoine92190/vue-advanced-chat#use-in-a-vue-3-project The usage is not perfect, but the library relies on other projects that are not migrated to vue 3 yet. This should be soon available though: PeachScript/vue-infinite-loading#312 Until then, you can use this workaround.

Trying these steps but it throws error about refs:
Uncaught (in promise) TypeError: ref is undefined
onMessageAdded vue-advanced-chat.common.js:37197

image
image

Looks like it's related to this warning:

[Vue warn]: Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function. 

https://v3.vuejs.org/guide/migration/array-refs.html

@antoine92190 do you have idea how to fix this?
thanks

@rrolla
Copy link

rrolla commented Oct 24, 2021

@antoine92190 i created PR on my fork just to see how i fixed it: https://github.com/rrolla/vue-advanced-chat/pull/1/files
Documentation: https://v3.vuejs.org/guide/component-template-refs.html

@antoine92190
Copy link
Collaborator

@rrolla Thanks! Fixed in f51fe72

@yaphuiyi
Copy link

yaphuiyi commented Nov 4, 2021

@rrolla do you have the code in vue 3 syntax? I am trying to migrate the project to vue 3 but without success :( would appreciate if there is a version in vue 3

@rrolla
Copy link

rrolla commented Nov 4, 2021

@rrolla do you have the code in vue 3 syntax? I am trying to migrate the project to vue 3 but without success :( would appreciate if there is a version in vue 3

Hey, I was able to run it on vue3 after my fix, what's above ^

@antoine92190
Copy link
Collaborator

It is now possible to use this library with vue 3: https://github.com/antoine92190/vue-advanced-chat#use-in-a-vue-3-project The usage is not perfect, but the library relies on other projects that are not migrated to vue 3 yet. This should be soon available though: PeachScript/vue-infinite-loading#312 Until then, you can use this workaround.

The workaround above is not needed anymore, the next branch is now fully compatible with vue 3 🥳

@antoine92190 antoine92190 removed the in progress This is currently being worked on label Nov 15, 2021
@antoine92190 antoine92190 unpinned this issue Nov 15, 2021
@Sublime1
Copy link

Sublime1 commented Jan 6, 2022

Hi Antoine

just a quick question about the Vue 3 branch. I notice that you have been making a lot of changes to the Vue 2 branch but have not yet added these to the Vue 3 branch.

What are your plans regarding the Vue 3 branch? Do you plan to keep both Vue 2 and 3 versions up to date with new features? I presume that Vue 3 will become more important than Vue 2 in the long term.

Would love to hear your thoughts and thanks for an amazing library!

@antoine92190
Copy link
Collaborator

@Sublime1 Yes you are right, I didn't have the time to keep the vue 3 branch up to date.
I will try to keep it updated more often.

In the long term, I'm not yet 100% sure how I will manage the vue 2 and vue 3 branches, but I was thinking of making the vue 3 branch as default (master) and create a vue 2 branch. The vue 2 branch would then become a legacy one, and not be updated anymore.

If anyone has other ideas, I'm happy to hear it :)

@Sublime1
Copy link

Sublime1 commented Jan 7, 2022

Thanks Antoine. Yes, it's a tricky question, but I'm sure other projects are solving this issue too!

Maybe it's worth looking at the way that Vue themselves have done it: 2 separate repositories, each with its own releases.

Vue 2.x https://github.com/vuejs/vue
Vue 3.x https://github.com/vuejs/vue-next

thanks

@rrolla
Copy link

rrolla commented Jan 7, 2022

@Sublime1 Yes you are right, I didn't have the time to keep the vue 3 branch up to date. I will try to keep it updated more often.

In the long term, I'm not yet 100% sure how I will manage the vue 2 and vue 3 branches, but I was thinking of making the vue 3 branch as default (master) and create a vue 2 branch. The vue 2 branch would then become a legacy one, and not be updated anymore.

If anyone has other ideas, I'm happy to hear it :)

Good idea about vue 3 as master branch

@antoine92190
Copy link
Collaborator

@Sublime1 The issue with creating 2 repo is that the new Vue 3 repo would loose all it's visibility and stars, which would be a huge SEO step back. This project doesn't have the hype of VueJS (yet 😄), so I'm not sure it's a good idea...

@Sublime1
Copy link

Sublime1 commented Jan 7, 2022

Yes, that's an important point.

For me personally, at the moment I have forked your 2.x branch but want to switch to the 3.x version as soon as possible. If you will do what you are suggesting (switch the current "next" Vue 3 branch to become the default (master)), then I think probably the best approach for me is to merge your current "next" branch into my fork.

Please let us know once you have clarity on exactly what you plan to do. Thanks again!

@antoine92190
Copy link
Collaborator

antoine92190 commented Jan 9, 2022

@Sublime1 Just updated the next branch with latest updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants