MaxLeiter / sortablejs-vue3

A thin wrapper around Sortable.js for Vue 3
https://sortablejs-vue3.maxleiter.com
MIT License
364 stars 20 forks source link

Make SortableJS-vue3 compatible with vue2 ? #69

Closed messenjer closed 1 year ago

messenjer commented 1 year ago

I know it sounds like a weird proposal.

At the end of the year, vue2 will reach end of life and that will imply that a lot of big legacy projects will have to migrate to vue3.

The migration is not so trivial, you have to migrate:

One approach is to be prepared to already migrate the legacy code base of the applications to vue2/vue3 compatible plugins, libraries

If SortableJS-vue3 becomes compatible with Vue2 using vue-demi, we could start migrating Vue.Draggable in vue2 legacy code to SortableJS-vue3 and then make it easier to migrate to vue3.

What do you think?

Mathieu

MaxLeiter commented 1 year ago

Thanks for the comprehensive write-up! I wasn't familiar with vue-demi. My one fear is this increases the bundle size, so I'll need to verify if that's true, but otherwise the PR seems good to go.

messenjer commented 1 year ago

Thanks. Yes, it's also the first time I've taken a closer look at vue-demi. It's like your project: simple, small, and does exactly what it's supposed to do.

I made the adaptations you asked for in the PR https://github.com/MaxLeiter/sortablejs-vue3/pull/70

MaxLeiter commented 1 year ago

Closed by #70

Thanks a lot @messenjer!

messenjer commented 1 year ago

Hello @MaxLeiter ,

Now that the build is working, I tried to make the plugin work with a vue2 test application, and I can't. I suggest that we revert to my PR https://github.com/MaxLeiter/sortablejs-vue3/pull/70 , and I will do a repro at vue-demi to try to find a solution.

Sorry, with the build that wasn't working, I didn't get a chance to test it.

Regards

Mathieu