682 search results
Learn JS
Symfony UX: Stimulus
…the modal. To do that, we need to create a systematic way for our controller to communicate whether or not the form submit was successful. This new idea will serve us super well in the next tutorial when we Ajaxify more form submits with Turbo.
Learn Symfony
30 Days with LAST Stack
…in two lines. This is lower-level, but waits for the aria-busy attribute to be added to the html element, which Turbo does when it's loading. Then it waits for it to go away: Try the test now: Then... pop open the screenshot…
…once the user hovers. The popover library does have a way to do this. But as an extra, extra challenge, I want to do it with regular ol' Turbo frames. Because, Frames are really good at loading stuff via AJAX! Plus, we'll see a…
…did. I love coding with Stimulus. In the next tutorial in the series - about Turbo - I hope to show prove that we can have an even more dynamic and speedy app while writing even less custom JavaScript. Let us know what cool stuff your building…
…but that is exactly what we wanted! Our toast notification is polished and done. Tomorrow's adventure: diving into the third and final part of Turbo: Streams. These are the Swiss army knife of Turbo, and will let us solve a whole new set of…
AssetMapper: Modern JS with Zero Build System
…rendering. For example, @hotwired/stimulus is critical, stimulus-bundle is critical because that's what loads our controllers, and @hotwired/turbo is also critical. When we refresh... nothing changes: we just have more modulepreload items in the HTML. If we run Lighthouse one more time…
Learn Symfony 6
Doctrine, Symfony 6 & the Database
… After voting, we end up right back on this page. And, thanks to Turbo, this is all happening via Ajax calls... which is a nice bonus. The only problem is that... it's so smooth that it's not super obvious that my vote was…
…see a formatted version of it... though I need to refresh the page for this to work... because the Turbo JavaScript library we installed in the first tutorial doesn't always play nice with this profiler area. Anyways, we can also see a runnable version…
Symfony UX: Turbo
…in theory, we could write some JavaScript that listens to this topic and does something with that JSON. But remember: the turbo_stream_listen() function activates a Stimulus controller that is already listening to this topic. It's listening and waiting for a message whose…
…boring one that says "New York weather". However, Turbo does see the script tag that's inside of the new body - the script tag that we have down at the bottom of base.html.twig - and it does re-execute these lines. But this time…
…annoying problems with Turbo, which is cleaning up the snapshot, let's organize all of the new event code to make room for more turbo event listeners later. That will put us in a great position to discuss the last tricky thing with Turbo drive:…
Smart Frame Redirecting with the Server
Adding a Custom Request Header Based on the Frame
Manual "Restore" Visit
Frame Redirecting and Clearing the Snapshot Cache
Redirecting the Full Page from a Frame
Whoops, an error! Please, try again later.