…branch (say, open/closed) somewhere at the backend, also. Ideally in the session, rather than the DB, to reflect its transient nature. It feels like I'm missing something though, and even wondering if Turbo would solve this problem for me?
Thanks for listening,
Rik
…I would like to suggest you to subscribe to this course on the course intro page: https://symfonycasts.com/screencast/turbo - we will notify you when we will start releasing it.
P.S. We're very excited about this Turbo feature as well in SymfonyCasts…
…get update && apt-get install -y \
git \
wget \
unzip \
libzip-dev \
libmcrypt-dev \
libpng-dev \
libpq-dev \
zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& docker-php-ext-install \
pdo \
pdo_mysql \
…
…7.2.*",
"symfony/twig-bundle": "7.2.*",
"symfony/uid": "7.2.*",
"symfony/ux-autocomplete": "^2.23",
"symfony/ux-icons": "^2.21",
"symfony/ux-turbo": "^2.21",
"symfony/validator": "7.2.*",
"symfony/web-link": "7.2.*",
"symfony/yaml": "7.2.*",
"twig/extra-bundle": "^2.12|^3.0",
…
…beacause if checking first `app.request.headers.get('turbo-frame') == 'modal'` and it's returned false, it would not process the second part of the AND)
```
{% if app.flashes('_redirect') is empty and app.request.headers.get('turbo-frame') == 'modal' %}
{{ include('_render_flashes…
…there's basically no limitation, you can do whatever you want with it. And finally Turbo Frames / Streams is another tool that allows you to move your application into the next level: give it a single page application feel, i.e. when you click links…
…it's a weird thing where calling `submit()` doesn't dispatch a `submit` event and so Turbo or other JavaScript can't hook into it).
So, this is what I'd recommend and it will "just work". Otherwise, you're trying to fight against Turbo…
…in my template, on my 'index.html.twig' in my top column div is where I initially connect this controller. My page then contains two Turbo Frames, which I also want to mention, the second column on my page contains the frame where a form…
…find the Component for it, then call `compoent.render()` on that. Here are some docs on that - https://marcoroth.dev/posts/guide-to-custom-turbo-stream-actions
Because, ultimately, there is no pure HTML change that you can make that would trigger the live component…
…4.x-dev
"symfony/ux-autocomplete": "2.x-dev", // 2.x-dev
"symfony/ux-live-component": "2.x-dev", // 2.x-dev
"symfony/ux-turbo": "2.x-dev", // 2.x-dev
"symfony/ux-twig-component": "2.x-dev", // 2.x-dev
"symfony/validator": "6.4…
…The modal body is a turbo frame with an id of "dashboard-modal-frame"
```
{# THIS IS WHERE THE MAGIC HAPPENS #}
{{ "action.close"|trans(domain = 'EasyAdminBundle') }}
{# MAKE SURE THIS IS NOT A TYPE="SUBMIT" BUTTON #}
{{ "action.save"|trans(domain='EasyAdminBundle') }}
```
*5.* Override the easy admin…
…and event trick. But instead of making an Ajax call, you would grab the `date` from the event, set it onto the hidden input, then find and submit the form. Then let the Turbo frame handle the rest.
Let me know what you think1
Cheers!
…you want.
We do not have a tutorial specifically about Mercure, but we touch on it a few times - like https://symfonycasts.com/screencast/turbo/mercure (and the next few chapters). The big difference there is that we're sending HTML in the Updates and…
…So, you would eventually be passing something like a `articleReferencesPager` into the template and using that to render the article references and the pagination links. The great thing about Turbo Frames is that... you don't need to do anything else. The form submit and…
…I am not aware of any `data-turbo="restore"` type of attribute you could add somewhere to opt into this). To do this, I would try to "cancel" the visit - https://turbo.hotwired.dev/handbook/drive#canceling-visits-before-they-start - but I don't…
…set up, but it generally solves the issue.
Btw, for us, we're using Stimulus and Turbo for most of our JavaScript. Then, we use something like React or Vue for the cases where we have a particularly interactive "widget" on some page(s). It…
…at those course I mentioned above probably, we haven't talked about JWT in other courses unfortunately.
Oh, or take a look at this video too: https://symfonycasts.com/screencast/turbo/mercure-jwt - might be useful for you I suppose.
I hope that helps!
Cheers!
…If you were using Turbo (that's a whole other topic), you could probably use a Turbo frame + Turbo Streams to accomplish this. Or just put the "add new user" form onto a totally different page, and leverage Turbo Drive to make the experience feel…
…the ABC React component and pass it these props", where those props could be anything, even an object that's serialized to JSON. So again, this is very similar to Inertia.js... but it's only one thing that Stimulus (and Turbo) can do :).
Cheers!
…a few months, unfortunately, because we have some other super high priority things to cover like Symfony UX/Stimulus/Turbo &
Symfony 5.2 to name the 2 most important things at the moment. But if you have any other problems or questions, let me know…
x
682