…want to refresh the content of a `turbo-frame` you need to return another `turbo-frame` element in your HTML response with the same ID attribute as the one you want to refresh/replace. So, having two `turbo-frames` with the same ID in different…
Hello |mention:16670|
Sorry for the late reply, interesting according to this link https://github.com/symfony/ux/issues/1520 it should be already fixed, however it will be good to know what versions of Symfony, Turbo are installed at your project
Cheers!
I'm not saying it is impossible but basically, you'll have to modify EasyAdmin in a way that it can work with Turbo. That's something I've not done in the past, so I can't say how hard it might.
…
Really glad you enjoyed it!
> Is it possible to trigger the same action of clicking the data-turbo-frame link but from an stimulus controller ?
Here's how I would probably handle this:
A) Pass the url - `my_url` - into your Stimulus controller as…
Ryan,
I read through the blog post and it seems close but I want to explain my situation a little more. LiveComponent #1 located in a Turbo Frame in column 1, lets you select a Category, Subcategory, and Group to find a specific item. Next…
Hey @CDesign!
Sorry for my VERY slow reply! I would check a few things:
A) Is Turbo running otherwise - like do you see no page reloads during normal navigation? My guess is yes, but we need to check.
B) Watch your browser console closely. Do…
…In Turbo 8 (released today, so I haven't played with it yet), you may be able to preserve the scroll position by adding:
```
```
to your page. Note: this will only work for what Turbo 8 calls a "page refresh": when the navigation you're…
…the page scrolls up at the top. That's why I thought it was fully recharging!
Usually, Turbo reloads the page without any move, which gives a nice impression of fluidity. Here, it doesn't have this behavior.
Your solution works the same way: the…
… Internally, when you redirect from `LiveAction`, LiveComponents sees that and checks to see if `Turbo` is installed. If it is, it does a `Turbo.visit()` instead of a real, full site redirect.
So that works great. But you want something different: not a page navigation…
Hi, I'm using a Live Component with a Live Action that ends with
`return $this->redirectToRoute('my-route');`
Is there a way to load this new page (only the changing part) in a turbo-frame ?
Thanks for your answer
Cyril
Hi, I am sorry if I missed something, but I have taken this course to figure out how to make advanced dialogs using Turbo and Stimulus with Symfony. The solution in the tutorial looks fine, but I have noticed two things.
First, after successfully submitting…
…grips with AssetMapper or LiveComponents yet, so I was all the more pleased to finally get to know the packages. I also learned a few new tricks for Turbo. 😁👍
But the highlight for me was - by far - the DependentFormFields, thank you very much for…
…screencast/turbo/prevent-frame-rendering
Putting the code below in the controller now prevents the frame rendering from taking place if the modal isn't open (anymore).
If there is more to it, maybe you can let us now.
connect() {
this.element.addEventListener('turbo:before…
|
|
// ... lines 1 - 4
|
|
use Facebook\WebDriver\WebDriverBy; |
|
|
// ... lines 6 - 7
|
|
class AppBrowser extends PantherBrowser |
|
{ |
|
|
// ... lines 10 - 17
|
|
public function waitForDialog(): self |
|
{ |
|
$this->client()->wait()->until(function() { |
|
return $this->crawler()->filter('dialog[open]')->count() > 0; |
|
}); |
|
|
|
if ($this->crawler()->filter('dialog[open] turbo-frame')->count() > 0) { |
|
$this->waitForTurboFrameLoad(); |
|
} |
|
|
|
return $this; |
|
} |
|
|
|
public function waitForTurboFrameLoad(): self |
|
{ |
|
$this->client()->wait()->until(function() { |
|
return $this->crawler()->filter('turbo-frame[aria-busy="true"]')->count() === 0; |
|
}); |
|
|
|
return $this; |
|
} |
|
} |
See Code Block in Script
thank you very much for the answers, at this point the question comes naturally, why choose stimulus/turbo and not react or vue js? I would like to understand the pros and cons between the two choices. ^_^
Sure, I take this opportunity to ask another question, but is this topic of the turbo and the hotwire very new ? I have had to search around for information or even pre-made templates but without success. Thank you
Hey @lexhartman!
Good question! You can use vue, ux-turbo, stimulus, etc with Webpack Encore just fine. So the REAL question is: can I use Encore & AssetMapper in the same project. The answer is: theoretically yes, but I wouldn't recommend it. They weren't…
…yourself :p Anyway, if you want to reload content in the specific frame - I believe you need something like this:
```
My Link
```
I.e. `data-turbo-action="replace"` should do the trick, you just need to point that link to specific frame, and specific URL…
…planet links in the turbo-frame `planet-card-{id}`.
I don't know it's possible, but it could be cool to know : How can I force a page reload on a link who's come from another turbo-frame in the actual turbo-frame …
Thanks a lot Ryan for this incredible course. I have a side question: can you tell us which plugins do you use in your Phpstorm? In mine, twig:Button or turbo-stream for example are underlined because unknown for Phpstorm. Thanks!
x
682