590 search results for Turbo

Simply out of curiosity, why isn't the behavior behind the data-turbo-track="reload" attribute something that's done by default? Isn't this something you always want checked? Why is it optional? ...
Hey again shadowc ! Just a small update: this is now supported in Turbo 7.1.0 - here are the docs :) https://turbo.hotwired.dev/handbook/frames#promoting-a-frame-navigation-to-a-page-visit Cheers! ...
weaverryan
weaverryan
Read Full Comment
... Ah! You're right! It's new in RC4! https://github.com/hotwired/turbo/releases/tag/v7.0.0-rc.4 So that will allow us to simplify things. I'll investigate and add a note to the video to help people. Thanks for the pointer!
weaverryan
weaverryan
Read Full Comment
Hey Ilya, Thank you for your interest in SymfonyCasts tutorials! This course should be the next after "Symfony UX: Turbo" that is releasing right now. I think this should happen in about 2 weeks. Thank you for your patience! Cheers! ...
Yes! It worked! You're the King, Ryan! Thank you for your help and, once again, for your great tutorials. I'm looking forward to the next one on "Turbo". Cyril ...
Hey Michael B.! Ah!!! This is awesome - and I'm so honored. Alpine is a very powerful system - so I'm even happier that you like Stimulus (I also much prefer its approach). And Turbo is... starting today! Cheers! ...
weaverryan
weaverryan
Read Full Comment
My mind is now fully blown by how easy and intuitive stimulus makes doing front-end javascript dev without abandoning Twig. Thanks and I can't wait for the Turbo course! ...
... Hey Axel! We'll cover that :). Well, specifically Turbo and Mercure - there is absolutely a built-in feature for having a section of your site subscribe for updates and have them added automatically. It's pretty sweet. Cheers!
weaverryan
weaverryan
Read Full Comment
105 lines | src/Controller/ProductAdminController.php
// ... lines 1 - 31
/**
* @Route("/new", name="product_admin_new", methods={"GET","POST"})
*/
public function new(Request $request): Response
{
// ... lines 37 - 55
return $this->renderForm('product_admin/' . $template, [
'product' => $product,
'form' => $form,
'formTarget' => $request->headers->get('Turbo-Frame', '_top')
]);
}
// ... lines 63 - 105
See Code Block in Script
104 lines | src/Controller/ProductAdminController.php
// ... lines 1 - 61
/**
* @Route("/{id}/edit", name="product_admin_edit", methods={"GET","POST"})
*/
public function edit(Request $request, Product $product): Response
{
// ... lines 68 - 82
return $this->renderForm('product_admin/edit.html.twig', [
'product' => $product,
'form' => $form,
'formTarget' => $request->headers->get('Turbo-Frame', '_top')
]);
}
// ... lines 89 - 104
See Code Block in Script
36 lines | templates/cart/_featuredSidebar.html.twig
// ... lines 1 - 17
{% if showDescription %}
{{ featuredProduct.description }}
{% else %}
{{ featuredProduct.description|u.truncate(25)|trim }}...
<a
data-turbo-frame="cart-sidebar"
class="frame-loading-hide"
href="{{ path('_app_cart_product_featured', {
description: true,
}) }}">(read more)</a>
<span class="frame-loading-show fas fa-spinner fa-spin"></span>
{% endif %}
// ... lines 31 - 36
See Code Block in Script
import { Controller } from 'stimulus';
import { visit } from '@hotwired/turbo';
export default class extends Controller {
count = 0;
static targets = ['count'];
increment() {
this.count++;
this.countTarget.innerText = this.count;
if (this.count === 10) {
visit('/you-won');
}
}
}
See Code Block in Script
113 lines | src/Controller/VoyageController.php
// ... lines 1 - 15
class VoyageController extends AbstractController
{
// ... lines 18 - 64
public function edit(Request $request, Voyage $voyage, EntityManagerInterface $entityManager): Response
{
// ... lines 67 - 69
if ($form->isSubmitted() && $form->isValid()) {
// ... lines 71 - 73
if ($request->headers->has('turbo-frame')) {
$stream = $this->renderBlockView('voyage/edit.html.twig', 'stream_success', [
'voyage' => $voyage
]);
$this->addFlash('stream', $stream);
}
// ... lines 81 - 82
}
// ... lines 84 - 88
}
// ... lines 90 - 111
}
See Code Block in Script
14 lines | templates/voyage/_row.html.twig
<tr class="even:bg-gray-700 odd:bg-gray-600">
// ... lines 2 - 4
<td class="px-6 py-4 whitespace-nowrap">
// ... line 6
<a
href="{{ path('app_voyage_edit', {'id': voyage.id}) }}"
class="ml-4 text-yellow-400 hover:text-yellow-600"
data-turbo-frame="modal"
>edit</a>
</td>
</tr>
See Code Block in Script
Hey |mention:56475| , That https://symfonycasts.com/screencast/last-stack course is the latest indeed, but it includes more topics besides Stimulus & Turbo. If you're looking for a Stimulus and Turbo course in more ...
Hey @Cyril! That's an interesting situation! 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 ...
weaverryan
weaverryan
Read Full Comment
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 ...
... prepend row!). I think (though I still need to play with it more and see what patterns develop) the ultimate solution will be in Turbo 8. In Turbo 8, I believe we'll be able to send back a ``. This will simply tell ...
weaverryan
weaverryan
Read Full Comment
Hey @tonysm! > Nice! I'd add a data-turbo-temporary attribute to the notification message itself so it's not added to the page cache if the user leaves the page before the notification is closed/removed (it would ...
weaverryan
weaverryan
Read Full Comment
... This IS what I would do, however, in 99% of the cases when I needed to do a manual visit in Turbo. But you mentioned: > The routes are created using data from an ajax response Ok, so you basically have a situation where ...
weaverryan
weaverryan
Read Full Comment