koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

vue3 support #294

Open miguelrk opened 2 years ago

miguelrk commented 2 years ago

Hello everybody!

Been using this library with great pleasure in my Vue 2.0 project. Like surely many, I am planning on updating to Vue 3.0 now that the ecosystem is catching up and was wondering if vuetify-jsonschema-form is already vue3 compatible or if this is already planned? Any news on this would greatly help with planning, etc. This would be great, thanks for all the effort and great work!

albanm commented 2 years ago

Hello,

That is a good question, unfortunately the response will not be very satisfying:

All in all, I think you should not expect a support of vue 3 soon, probably not before a few months. But if someone is willing to start exploring the subject earlier in a fork I will gladly have a look and maybe revise my position and merge a pull request earlier.

miguelrk commented 2 years ago

Thanks for the quick answer! I totally understand, Vuetify 3.0 is the main bottleneck here. I would also agree that maintaining 2 versions of the lib might be too much, there however exists a pretty good solution to this @vueuse/vuedemi. This might indeed be worth it, since it would provide support for both vue2 and vue3 under a single lib. This I guess could already be started when vuetify3 reaches beta/stable version (maybe even beforehand). What do you think about this solution? I would be greatly interested and could maybe help with this with some guidance.

albanm commented 2 years ago

Hard to say. It looks promising but it depends on the scope of the changes brought by vuetify 3 I suppose. If almost all the code inside the render functions ends up separated by conditions on vue2/vue3 this might get hard to manage. The tests / doc will have to be duplicated to be able to ensure proper working in both versions of vue. I am a little afraid this would create some complexity embedded in the code of the lib on the long term, compared to a temporary retro-compatibility branch dropped after a year or so.

Still that is interesting and being able to use the composition api in vue 2 as a plugin looks cool. I really need to look deeper into it, and evaluate if using it could help improve the design of vjsf.

Feel free to have a go at it in a fork if you want, I will gladly try to answer question, but I can't make any promise on when I will myself dive into the topic.

miguelrk commented 2 years ago

Thanks! I see your points, and yeah, now that you say it it might indeed be better to have a retro-compatibility branch for a while and then drop it.

I'm not entirely aware of the inner workings of vuetify-jsonschema-form, but I see how the major changes in vuetify3 could bring lots of changes for a rewrite. I will hopefully have some time soon to make a first attempt at this. Thanks again! I'll stay in touch.

suraj740 commented 1 year ago

Hi @albanm @miguelrk any update on vue3 support?

Thanks!!

miguelrk commented 1 year ago

Hey @suraj740!

The wait for vuetify3 ended up being longer than expected, therefore this issue got sort of pushed back. But vuetify3 is now almost feature complete (RC is very close now). I would be interested in following-up this issue. Should we maybe create a new vuetify3 branch? What would be your best way forward @albanm ?

albanm commented 1 year ago

Hello I won't have time to look into it in the next few months unfortunately.

If someone is willing to work on it in a fork then prepare a pull request that would be the best way to proceed. The fork should minimize changes as much as possible so that maintaining parallel vue 2 and vue 3 branches would be easy.

miguelrk commented 1 year ago

Great! I think I would wait for at least the RC, or some more major components like v-data-table to be in vuetify3 to start the fork. But I would be willing to push this forward. Thanks @albanm !

@suraj740 let me know if you are also interested in this to work somethig out!

suraj740 commented 1 year ago

Hi @miguelrk sure I would like to work on this. Let me know when we can start.

suraj740 commented 1 year ago

@albanm @miguelrk can you pls provide me the instructions for development setup for this library ?

albanm commented 1 year ago

There is this https://github.com/koumoul-dev/vuetify-jsonschema-form/blob/master/CONTRIBUTE.md

cugu commented 1 year ago

I'm not a good javascript developer but I started to play with a vue(tify) 3 migration: https://github.com/cugu/vuetify-jsonschema-form/pull/1

I'm pretty much stuck now and might not finish this work, but maybe that code helps someone else trying the same.

FlorezAdam-FS commented 9 months ago

@albanm @miguelrk my team is using this product and need it updated for our project. Would it be okay if I looked at and forked the code to see if I am able to assist?

albanm commented 9 months ago

This is discussed here https://github.com/koumoul-dev/vuetify-jsonschema-form/issues/409#issuecomment-1697124481

The next major version is advancing quite well, but with still quite a lot of work to do.