-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Turbo] data-turbo-track
attribute for CSS is missing
#2137
Comments
data-turbo-track
attribute for CSSdata-turbo-track
attribute for CSS is missing
Not "the JS links", only the importmap script, if AssetMapper is installed :) Are you suggesting a new feature ? Or is there something not working as you'd expect ? |
For https://ux.symfony.com/ there is the following source code: Shouldn't that be it? [...]
<link rel="stylesheet" href="/assets/styles/app-e6e5573999adb63729abd6652c7ebcd5.css" data-turbo-track="reload">
<link rel="stylesheet" href="/assets/vendor/tippy.js/dist/tippy-2cffb277c396057474574f721014a03f.css" data-turbo-track="reload">
<link rel="stylesheet" href="/assets/vendor/tippy.js/themes/translucent-02f3023fa2e1a35311c7e80893e98a69.css" data-turbo-track="reload">
<script type="importmap" data-turbo-track="reload">
[...] |
Can you explain why? I do not agree nor disagree here, it's a genuine question :) Is it always the case ? Or something developper should set manually ? It seems logical to me on the importmap, but i feel (i may be wrong) that stylesheet rule would be really hard to generalize Could you illustrate on the website what would be the effect / in which scénario ? :) |
These are genuine questions :) |
I don't have an example to give you :/. I saw it used on https://app.hey.com/. |
Well, i don't think we can do it with AssetMapper / ImportMap for now.... at least not with the importmap() function. foreach ($modulePreloads as $url) {
$url = $this->escapeAttributeValue($url);
$output .= "\n<link rel=\"modulepreload\" href=\"$url\">";
} But this could be a good PR for AssetMapper :) |
Hi :),
I see that the JS links have the
data-turbo-track
attribute but not the CSS ones:https://github.com/symfony/ux/blob/2.x/src/Turbo/src/DependencyInjection/TurboExtension.php#L102
https://turbo.hotwired.dev/reference/attributes
The text was updated successfully, but these errors were encountered: