586 search results for Turbo

{% block create %}
<turbo-stream action="update" target="product-{{ entity.product.id }}-quick-stats">
<template>
{{ include('product/_quickStats.html.twig', {
product: entity.product
}) }}
</template>
</turbo-stream>
<turbo-stream action="append" target="product-{{ entity.product.id }}-review-list">
<template>
{{ include('product/_review.html.twig', {
review: entity,
isNew: true
}) }}
</template>
</turbo-stream>
{% endblock %}
// ... lines 19 - 27
See Code Block in Script
99 lines | templates/base.html.twig
<!DOCTYPE html>
<html>
// ... lines 3 - 15
<body class="bg-black text-white font-mono">
// ... lines 17 - 55
<div
// ... lines 57 - 58
>
<dialog
// ... lines 61 - 63
>
<div class="flex grow p-5">
<div class="grow overflow-auto p-1">
<turbo-frame
id="modal"
// ... lines 69 - 71
>
<turbo-stream action="append" target="flash-container">
<template>{{ include('_flashes.html.twig') }}</template>
</turbo-stream>
</turbo-frame>
</div>
</div>
</dialog>
// ... lines 80 - 95
</div>
</body>
</html>
See Code Block in Script
99 lines | templates/base.html.twig
<!DOCTYPE html>
<html>
// ... lines 3 - 15
<body class="bg-black text-white font-mono">
// ... lines 17 - 55
<div
// ... lines 57 - 58
>
<dialog
// ... lines 61 - 63
>
<div class="flex grow p-5">
<div class="grow overflow-auto p-1">
<turbo-frame
id="modal"
// ... lines 69 - 71
>
<turbo-stream action="append" target="flash-container">
// ... line 74
</turbo-stream>
</turbo-frame>
</div>
</div>
</dialog>
// ... lines 80 - 95
</div>
</body>
</html>
See Code Block in Script
56 lines | templates/planet/show.html.twig
// ... lines 1 - 4
{% block body %}
<div class="m-4 p-4 bg-gray-800 rounded-lg">
// ... lines 7 - 8
<turbo-frame id="planet-info">
// ... lines 10 - 35
<div class="mt-2 hidden turbo-frame:block" >
<a href="{{ path('app_homepage') }}">&lt;-- Back</a>
<a data-turbo-frame="_top" href="{{ path('app_planet_edit', {'id': planet.id}) }}">Edit</a>
</div>
</turbo-frame>
// ... lines 42 - 53
</div>
{% endblock %}
See Code Block in Script
... *really* tried to solve all of the issues there. This includes rendering the flash messages on success and updating the current page (through Turbo streams). However, I do think you still have a nice question: > So, I ...
weaverryan
weaverryan
Read Full Comment
Hey Dave B.! Hmm, that's an interesting question! My first instinct was to say "just return the turbo-frame WITH the final content (instead of a lazy turbo-frame with src="") from the turbo-stream". However, I think ...
weaverryan
weaverryan
Read Full Comment
Publishing Mercure Updates in PHP

We now know that we can easily subscribe to a Mercure topic in JavaScript. And, if we publish a message to that topic with <turbo-stream> HTML in it, our JavaScript will instantly notice & process it. Sweet! So far ...

3:47
... As symfony/ux-turbo-mercure has been abandoned (files are located in symfony/ux-turbo), you now should run `composer req symfony/mercure-bundle` instead. Also, set `enabled` to `true` in assets/controllers.json for the mercure-turbo-stream config.
56 lines | templates/planet/show.html.twig
// ... lines 1 - 4
{% block body %}
<div class="m-4 p-4 bg-gray-800 rounded-lg">
// ... lines 7 - 8
<turbo-frame id="planet-info">
// ... lines 10 - 35
<div class="mt-2">
// ... lines 37 - 38
<a data-turbo-frame="_top" href="{{ path('app_planet_edit', {'id': planet.id}) }}">Edit</a>
</div>
</turbo-frame>
// ... lines 42 - 53
</div>
{% endblock %}
See Code Block in Script
139 lines | templates/main/homepage.html.twig
// ... lines 1 - 27
{% block body %}
<div class="flex">
// ... lines 30 - 36
<section class="flex-1 ml-10">
// ... lines 38 - 56
<turbo-frame id="voyage-list" data-turbo-action="advance" class="aria-busy:opacity-50 aria-busy:blur-sm transition-all">
// ... lines 58 - 134
</turbo-frame>
</section>
</div>
{% endblock %}
See Code Block in Script
Hey @Cyril! Ah! So I can explain this: > Usually, Turbo reloads the page without any move, which gives a nice impression of fluidity With a normal Turbo navigation (i.e. NOT inside a ``) Turbo actually DOES ...
weaverryan
weaverryan
Read Full Comment
Cosmic Coding with Symfony 7

... first into Twig & templating Your new favorite debugging tool: the web debug toolbar Simple, but crazy-powered CSS & JS setup with AssetMapper! Install & Running Tailwind CSS Intro into Stimulus & Turbo for JavaScript ...

20 videos
|
1:53:05
I tried but it doesn’t work. The live component is in the turbo-frame, the live action is redirecting to the same route (reloading the same page via the controller). So the turbo-frame element is in the returned HTML ...
15 lines | assets/app.js
// ... lines 1 - 10
// start the Stimulus application
import './bootstrap';
import './turbo/turbo-helper';
See Code Block in Script
<turbo-frame id="modal">
{% block body %}{% endblock %}
</turbo-frame>
See Code Block in Script
8 lines | assets/app.js
import * as Turbo from '@hotwired/turbo';
// ... lines 2 - 5
//Turbo.session.drive = false;
// ... lines 7 - 8
See Code Block in Script
11 lines | templates/planet/_card.html.twig
<turbo-frame id="planet-card-{{ planet.id }}">
// ... lines 2 - 9
</turbo-frame>
See Code Block in Script
16 lines | assets/controllers.json
{
"controllers": {
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
},
// ... lines 8 - 11
}
},
// ... line 14
}
See Code Block in Script
54 lines | templates/vinyl/browse.html.twig
// ... lines 1 - 27
<turbo-frame id="mix-browse-list-{{ pager.currentPage }}">
// ... lines 29 - 49
</turbo-frame>
// ... lines 51 - 54
See Code Block in Script
... added to the database from the modal. This second column is wrapped in a Turbo Frame. The challenge I'm facing is that the original Live Component in column one is loaded in a Turbo Frame. When there is a form success ...