I know this post going to sound bit illogical but thats the observation I have with my approach on developing on vaadin.
I already posted a forum [thread]
(https://vaadin.com/forum/thread/18435527/vaadin-html-components-usage) no replies yet but now things getting serious as launch date of my hobby app is coming sooner and no matter how proud I am of my back-end the way it shaped up. I have a very little confidence still on the UI part. Its my FIRST experience with vaadin and I chosen it over React just because I was in full mood of java (front and back) and I did my homework how much I can, thanks to forum and excellent help online.
Time for some real questions/observation :
Mine is a single page site but has lots of dynamic components that gets generated based upon the back-end results, the current problem I have is with the java script (jquery). I loaded them through PageConfigurator and they can be seen indeed generated in my chrome browser (developer tool) as defer see [this]
(https://vaadin.com/forum/thread/18439997/how-to-add-script-to-end-of-the-body-tag) although I still want scripts to be at end of body tag (probably would have been piece of cake with React).
The real problem however is the execution of these java scripts because html design on a visual code works correctly with same sets of scripts that is generated by vaadin at runtime but it DON’T work exactly the same way it works for my prototype. So, what is the problem ?
I mean all those image hover effects are lost plus bootstrap nav tabs click don’t work say only click on first tab works or 4th but not second or third, this is making me crazy. I copied the generated html from chrome browser (just the html keep in mind) then i leave those scripts at end of body tag … same copied data works perfectly. But not on server… some css effects are seen … some are lost. On UI I am using boostrap 4 and Argon design system which is based upon it.
If you have an example of a bootstrap/argon component you are trying to implement I can try to help you and add this in the add-on (if it’s a generic bootstrap component).
@Jean-Christophe Gueriaud I am not good in UI and any help would be great you can see the beta site [here]
(http://beta.newshash.nl/) and right now I am not having good feeling with the visible bugs I have. Argon is just design system you already included in your demo I remember and its standard bootstrap 4 based.
All works ok on my design html page but when it goes through vaadin thing changes, also I really want to put those java scripts really at the end of the body, is it even possible in vaadin ?
Note: I also requested help to Argon team may be its something there side too.
It’s using data-ride="carousel (or other data-).
Why it’s not working?
If your page is only static html, once the page is loaded a javascript is looking for a data-ride=“carousel” and applies the carousel rules
If your page is dynamic (like with vaadin or react), you don’t reload the entire page for every action.
So the script that looks for data-ride=“carousel” when the page is loaded does not run then the carousel is broken.
This is probably the reason why data-animation=“zooming” is buggy. Do you have a html example of a working example? Or documentation from bootstrap/argon?
Thanks for your reply.
I don’t reload the whole page . I only construct the carousel dynamically so add the image src returned and construct that component dynamically (with vaadin html flow components like Div etc, loop them etc with correct css)
I used [this]
(https://demos.creative-tim.com/argon-design-system-pro/examples/blog-posts.html) carousel it just adding the right js and css. If you have argon downloaded you can just copy the html from beta site and use a simple text editor to paste it (only the html part so anything below body tag div class=“viewport” part) and paste it in argon master folder you will see it works but not on the site.
Those memes are generated with every refresh (so thats already a page realod) I wanted to implement server push but that is something for future and not for this landing page at least no time.
Above I pasted a snippet of code that is contained in my main viewport div that also implements RouterLayout, PageConfigurator and provides all the path to js/css etc and this only once loads adds the memem section below.
Yes I have pro theme I bought it sometime ago was on discount and I used it also for my another react app.
But issue seems to exists I am completely disappointed … seems to lot to learn before I can make it work for a simple html code. Damn going to be long night :(.
Hi @Jean-Christophe Gueriaud however funny it sounds but I thought to update you.
The carousel issue remains and I am not worried about it as this component is only will ever be used on the beta site. The more worry for me was those bootstrap nav components those were not working as they should and they don’t require any javascript or jquery.
To my surprise when I gave up and went on to do a production build and the binary came out of it was working perfectly fine on any browser, so that problem was only on the development environment looks like some js is skipped or have issues.
I am happy that my main problem is resolved itself and I can move on.