Hey |mention:15156|
That's unexpected. I believe your site is running so fast that Turbo finishes loading before your `waitFor()` call. IIRC the second argument of that method is the amount of milliseconds it should ...
... merge https://github.com/symfony/ux/pull/1230 - but I'm planning to do it entirely with Turbo frames
> Can’t wait to see this training, it’s going to be great!
Me too!
Hey @Sameone!
You're totally right! In the video, I had forgotten to add a `target="_top"` to the `turbo-frame`, which forces all links inside to behave like normal links. We DO have a note about this in the video ...
... other mistake - the account is obviously not created, but no error is shown. There is no message what went wrong.
I figured out the problem occurs only when Turbo is enabled. Any idea how to fix it?
Best!
... behaviour (something like you mention like data-turbo="restore"), but this suits our needs :)
Thanks a lot for your help!!!
... this wouldn't trigger a rerendering of the HTML and testing proves that's true. Is there an elegant solution to this or would disabling turbo/hotwire on the form be the better approach?
He Ryan,
How do you get this to work with easyadmin. I have installed the @symfony/ux-turbo and added it to the easy admin dashboard with the configureAssets like so:
```
public function configureAssets(): Assets ...
Hey Ryan. I solved it by using turbo frames. It works like a charm now and I can put it everywhere I want to :D.
I created a route for the contact form and a partial I can include in my sitebuilding. In the partial I ...
Hey @Jay Gee!
Thanks for the post! I think Turbo Streams (and frames) are still so new that there are undoubtedly better ways to do certain things - I was pushing things pretty far, but mostly thinking of the "best ...
... pretty similar on this tutorial. You could put a turbo-frame around the entire "comments" area... which has the advantage that only that area updates when a new comment is added. But I'm guessing there is more to your question - so I will let you elaborate :).
Cheers!
Hey Nick F. !
Yes, I recorded this in an early beta version, and there we a bunch of nice little features added after. Not needing to "work around Turbo limitations" is a great thing in general. I'm going to check into ...
... tutorials. I can totally see, why you decided to use that hotwire ecosystem.
I can't wait for the turbo one.
Good job Ryan! Thanks for your efforts.
Hey Michael S.!
Absolutely! I was very sad to see the 2 maintainers leave :/. That being said, the community is huge, the projects using Stimulus & Turbo are huge - so we'll find a path forward. The technology is just ...
|
// ... lines 1 - 27
|
|
{% block body %} |
|
<div class="flex"> |
|
// ... lines 30 - 36
|
|
<section class="flex-1 ml-10"> |
|
<form |
|
method="GET" |
|
action="{{ path('app_homepage') }}" |
|
class="mb-6 flex justify-between" |
|
data-controller="autosubmit" |
|
data-turbo-frame="voyage-list" |
|
> |
|
<div class="w-1/3 flex"> |
|
<input |
|
type="search" |
|
name="query" |
|
value="{{ app.request.query.get('query') }}" |
|
aria-label="Search voyages" |
|
placeholder="Search voyages" |
|
class="px-4 py-2 rounded bg-gray-800 text-white placeholder-gray-400" |
|
data-action="autosubmit#debouncedSubmit" |
|
autofocus |
|
> |
|
</div> |
|
// ... lines 57 - 59
|
|
</form> |
|
// ... lines 61 - 145
|
|
</section> |
|
</div> |
|
{% endblock %} |
See Code Block in Script
|
<?php |
|
|
|
return [ |
|
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
|
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], |
|
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], |
|
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], |
|
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], |
|
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true], |
|
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], |
|
Symfony\UX\Turbo\TurboBundle::class => ['all' => true], |
|
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true], |
|
]; |
See Code Block in Script
The Request Object
...
fancy JavaScript. But we're going to keep it simple by adding a button that posts
a form. Well this will actually be fancier than it sounds. In the first tutorial,
we installed the Turbo JavaScript library. So even though ...
Testing Part 2 Functional Testing
... which Turbo does when it's loading. Then it waits for it to go
away:
Try the test now:
Then... pop open the screenshot. Woh! It is now waiting for the Ajax call to
finish. But remember: we're also using view ...
Hey |mention:56475| ,
It depends on your needs, the project, and your knowledge. We do recommend Stimulus/Turbo as it's a straightforward tool with a nice Symfony integration. This is just ideal if you have a server ...
... 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 is added to the page, but it doesn't listen to it until a page refresh. When you change the form in the second column, it updates the first column with the another Turbo Frame.
... & Turbo. So even if I created a TwigComponent (because maybe I want something to be reusable, or provide its own variables), if I need some interactivity (like submitting a form via Ajax), I might just use Turbo & Stimulus for ...
585
Turbo
Filter Results