Hmm, that is a mystery! If you have `@hotwired/stimulus` in your `package.json`, then this error:
> Module build failed: Module not found:
"../../vendor/symfony/ux-turbo/assets/dist/turbo_controller.js" contains a ...
I get that turbo is used to make the page more SPA like, but how is that different from a full page refresh? There's no pre-loading, sure it keeps the console state etc, but it still takes time to load the page from the ...
... does something on window.load event. And since this event is not fired on turbo visits the widget is not initialised properly.
This is an excellent theory. Unfortunately, it's still quite common for external ...
...
- https://symfonycasts.com/screencast/turbo/disabling
As you can see, Webpack Encore already knows how to handle it, you just need to configure it.
Cheers!
Hey It O.!
I got bit by the Symfony World conference and 2 new libraries I built for it - they're kind of fun, and fit right into the Turbo & Stimulus world (one is built on top of Stimulus): https://github.com/symfony ...
|
// ... lines 1 - 4
|
|
{% block body %} |
|
<div class="m-4 p-4 bg-gray-800 rounded-lg"> |
|
<div |
|
class="flex justify-between" |
|
> |
|
// ... lines 10 - 11
|
|
<twig:Button |
|
href="{{ path('app_voyage_new') }}" |
|
data-turbo-frame="modal" |
|
class="flex items-center space-x-1 font-bold" |
|
> |
|
<span>New Voyage</span> |
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 inline" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /><path d="M9 12h6" /><path d="M12 9v6" /></svg> |
|
</twig:Button> |
|
</div> |
|
// ... lines 21 - 40
|
|
</div> |
|
{% endblock %} |
See Code Block in Script
Hello everyone,
I would like to describe a problem that I noticed when working with modals and AjaxForms and UX Turbo. I want to do the following:
In the website there is a button in the header that opens a modal ...
Visually Highlighting new Items that Pop onto the Page
... item_controller.js. I'll paste in the normal structure, which
imports turbo, exports the controller and creates a connect() method.
Before we fill this in, go over to _review.html.twig and use this. I'll break this
onto ...
Symfony UX
... tiny JavaScript library and the topic of
this tutorial.
The second part of a rich user interface is being able to avoid full page refreshes.
That's handled by Turbo: the topic of the next tutorial.
Put Stimulus and Turbo ...
... ') }}
{% endblock %}
```
in app.js:
```
import { StreamActions } from "@hotwired/turbo"
StreamActions.redirect = function() {
const href = this.getAttribute("href")
Turbo.visit(href ...
... thought of creating a `redirect_controller.js` to change the` window.location.href` through a turbo-stream, but then I miss the toast notification ...
Is there a way I'm not aware of ? Does anyone have a better idea ?
Thanks a lot for your work, and of course I wish Ryan a full recovery !
Hey Ryan, I have a Turbo Stream update working well. On my site I have a small Stimulus controller that listens for changes in a form, and then on change submits the form automatically, successfully doing inline editing ...
... differences between the previous and the new version?
TOP: you keep your courses up to date, going into latest developments (like Turbo for instance)
TIP: Symfony 7 goes into SPA, could you also include PWA (Progressive Web App)?
Keep on rocking!
... to "undo" that, then the click needs to "advance" the navigation. For example, if you're navigating a turbo frame, by default, those link clicks to not advance the navigation (and so they also do not change the URL). But ...
Is it possible (would you recommend) using react or vue, ux-turbo, stimulus, assetmapper AND webpack encore at the same time in one project? I really like assetmapper so i want to use it in my new project but i also ...
... web app that returns HTML, AssetMapper + Stimulus + Turbo can give you a great UX & DX. So, there are 2 paths and both are valid.
Let me know if that makes sense :).
Cheers!
Hey @pasquale_pellicani!
Are you thinking about Stimulus & Turbo? Or about importmaps and something like AssetMapper? If it is importmaps and AssetMapper, that's a pretty easy answer: it's actually all still quite ...
... will need to submit individually. And so it's definitely a case where you'll want to avoid a full page refresh. I would normally use Turbo Frames for the Ajax submitting side of things, but that is not a requirement ...
... much of a problem this is anymore in practice.
However, yes, using this stimulus/turbo setup would avoid any potential SEO problems because... the page is loading as normal JavaScript. Even if a crawler didn't support ...
... content via Turbo.visit('url') (needed to import the turbo library) and the other just shows a hidden static content (we find this approach a bit cumbersome).
- Is there any way to load dynamic content only once?
Thanks you very much in advance :) !
590
Turbo
Filter Results