retejs / context-menu-plugin

https://retejs.org
MIT License
11 stars 43 forks source link

vue-render-plugin compatibility #71

Closed daef closed 1 year ago

daef commented 1 year ago

I've read on https://retejs.org/docs/guides/context-menu#render-context-menu that this plugin doesn't support vue rendering yet. What would have to be done to support vue? I'd really like to use it :)

Ni55aN commented 1 year ago

do you want to customize it with Vue components?

For now I have other tasks in priority, but I plan to add the appropriate presets to Vue and Angular, but I can’t say exactly when this will happen

daef commented 1 year ago

No, I dont want to customize it, I just want to use the context menu to add nodes to my dataflow :)

Ni55aN commented 1 year ago

so you can easily do it using the React render plugin along with your main render plugin :)

Check it out:

rete-kit app --next -s vue -v 3 -f "Vue render,Context menu"

This command creates a Vue.js project with the Vue render plugin and a context menu that will use the React render plugin. The only disadvantage of this approach is the slightly larger bundle size.

daef commented 1 year ago

What is this magic :) The last time I wanted to read up on rete-kit I think I only found a 'under construction' placeholder.

Thanks!

Ni55aN commented 1 year ago

you gave me an idea for a tweet 😁

image

daef commented 1 year ago

When I click the link to the docs on twitter I see the content flashing once before it gets replaced with Docs section not found thou :/

daef commented 1 year ago

image

Ni55aN commented 1 year ago

@daef you probably visited the site a few weeks ago and the browser cached outdated PWA data with this issue. You can either wait for the browser to download the new version of the site (it does this silently in the background), or force clear the cache in the DevTools -> Application -> Storage -> Clear site data

daef commented 1 year ago

This sounds like a really broken design - especially for docs, which are potentially visited semiregulary... Can't this fail more gracefully? I thought this PWA stuff was supposed to make things better.

Ni55aN commented 1 year ago

this is powered by @vite-pwa/nuxt. So far I have not delved into its config, maybe there is something to improve this. Or I'll just disable it

daef commented 1 year ago

I managed to read the contents by mashing Esc before the js kicks in :)