by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Adrien Baron
    @adrienbaron
    @mdavis95 @payammeyer would it be OK for you guys to do this transition on the current SNAPSHOT or would you rather see a release of current SNAPSHOT and a new SNAPSHOT with the migration?
    Payam Meyer
    @payammeyer
    Current is fine
    Matt Davis
    @mdavis95
    Yeah either way
    Yogh
    @yogh_gitlab

    Hi folks, I'm looking for a way to include a standard ES6 component in a vueGWT app. The custom element is registered to the DOM outside of vue, and I can include it in a vue template and it will work, however Vue will complain about the element being improperly registered / unknown (vue.js:584 [Vue warn]: Unknown custom element: <sizer-element> - did you register the component correctly?) - to solve this I've added v-pre to the custom element so vue will ignore it and the warning goes away. However, I also have a ref on the element so I can fire some (resize) events into it programmatically - this is no longer evaluated when I add v-pre and so the element I need a reference to will be undefined.

    Does anyone have any ideas to how I might achieve this without warnings?

    Adrien Baron
    @adrienbaron
    @yogh_gitlab hey :), just pointing out, those warnings should not display in production mode (will only display on dev mode) so it might not be too bad
    Also, is it a standard Vue.js component or is it a Web Component?
    Yogh
    @yogh_gitlab
    it's a Web Component, the extends HTMLElement { sort of thing
    Adrien Baron
    @adrienbaron
    Hum ok, I wonder if Vue.js also doesn't warn on that, they assume all things in templates are Vue components and warn you in case you forgot to register them.
    Not sure how to tell Vue that this is OK
    Yogh
    @yogh_gitlab
    just found there's also Vue.config.ignoredElements but I think I might run into the same problem where the ref won't work
    Adrien Baron
    @adrienbaron
    Ah! Yes definitly use that, I think you probably won't have the issue
    v-pre makes Vue think this is just "text" so it probably break the ref. The ignoreElements seems to be explicitely defined for your use case 👍
    (Meaning telling vue "Yeah I know, you don't know this native element, but trust me, it exists")
    Yogh
    @yogh_gitlab
    Vue.getConfig().addIgnoredElement("sizer-element"); works brilliantly, thanks!
    Adrien Baron
    @adrienbaron
    @yogh_gitlab great! You're probably the first person to use it in Vue GWT ^^
    Yogh
    @yogh_gitlab
    wups it actually didn't, got a cast exception when the addIgnoredElement method tried to cast from String to JsString
    this works though:
        final JsString str = Js.cast(ignoredElement);
        this.ignoredElements.push(str);
    I believe it tries to cast to a list because .push is a T... varargs
    Colin Alworth
    @niloc132
    varargs in java means you wrap in a java array - but varargs in jsinterop means it will behave as expected in js
    if you examine the generated JS, you'll see that the compiler likely did what you expected with regard to the array at least
    the String vs JsString is a different issue than varargs i _think? unless i'm misunderstanding you
    i may be totally misunderstanding you. what exactly is the classcastexception error message?
    24 replies
    Matt Davis
    @mdavis95
    Is Vue gwt going to support Vue 3?
    Adrien Baron
    @adrienbaron
    Hey @mdavis95 , it's definitely something I want to do :thumbsup: ! As usual I'm quite busy so not sure when I'll find the time, contribution in that direction are welcome :thumbsup:
    One of the main feature from Vue 3 is the Composition API, it sounds cool, but I don't think it will fit very well Java as a language, so we first might want to support Vue 3 as a lib, without the composition API?
    Other things that Vue 3 brings is tree shaking at the library level, not sure that's doable without something like the graddle/webpack setup
    Easiest first step hopefully would be simply switching full build of Vue 2 with full build of Vue 3 in Vue GWT
    If you guys want to experiment feel free to have fun with it :thumbsup:
    Payam Meyer
    @payammeyer
    doesn't quite sound fun to me ...
    Adrien Baron
    @adrienbaron
    Ahah working on Vue GWT is a lot of fun :)! There is also a whole suite of test that will let us make sure that nothing is broken :)
    Payam Meyer
    @payammeyer
    I love making applications using what you've built
    Adrien Baron
    @adrienbaron
    Thanks :), I'm glad you enjoy it!
    Dr. Lofi Dewanto
    @lofidewanto_twitter

    Did someone try to compile VueGWT webapp with Java 11?

    I got following error:

    Caused by: java.lang.NullPointerException
        at com.axellience.vuegwt.processors.component.template.builder.compiler.VueTemplateCompiler.initEngine(VueTemplateCompiler.java:31)
        at com.axellience.vuegwt.processors.component.template.builder.compiler.VueTemplateCompiler.<init>(VueTemplateCompiler.java:20)
        at com.axellience.vuegwt.processors.component.template.builder.TemplateMethodsBuilder.compileTemplateString(TemplateMethodsBuilder.java:55)
        at com.axellience.vuegwt.processors.component.template.builder.TemplateMethodsBuilder.addTemplateMethodsToComponentExposedType(TemplateMethodsBuilder.java:39)

    With Java 8 Oracle I could compile it without error...

    I'm using 1.0-beta-9
    Payam Meyer
    @payammeyer
    I’m pretty sure we did at some point, we are on Java 14 now, no issues.
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    @payammeyer : hmm wyrd... I'm trying also with Java 12 (all OpenJDK / Adopt OpenJDK) same error... Only Java 8 Oracle works fine... I'm using MacOS...
    Adrien Baron
    @adrienbaron
    Hey you might want to try the Beta 10 SNAPSHOT :)
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    @adrienbaron I'll try... wait a bit 😀
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    @adrienbaron WIth Beta 10 SNAPSHOT the compilation with Java 11 is working without any NullPointerException... 👍So it's time to make a new release? 😉
    Payam Meyer
    @payammeyer
    Oh right, sorry, I guess I should have mentioned we are on the latest.
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    @payammeyer : yes, thanks...
    Adrien Baron
    @adrienbaron
    Ahah yeah I need to get around and release it.. I think people here have been using the snapshot for a while so it should be safe to do :+1: , what do you guys think?
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Also working with GWT 2.9... 👍
    Update my gwt-boot-modules and gwt-boot-samples for VueGWT...
    Payam Meyer
    @payammeyer
    I’d say yes to the release
    Adrien Baron
    @adrienbaron
    Thanks @lofidewanto !
    Thanks @payammeyer !
    Matt Davis
    @mdavis95
    +1