From 52c922ef024f9e450860825713591dac03eace3e Mon Sep 17 00:00:00 2001
From: Hugo Alliaume
Date: Thu, 18 Sep 2025 13:56:52 +0200
Subject: [PATCH] [Toolkit] Minor fixes
---
src/Toolkit/bin/ux-toolkit-kit-debug | 2 +-
src/Toolkit/kits/shadcn/AlertDialog/manifest.json | 1 +
src/Toolkit/src/Kit/KitContextRunner.php | 2 +-
...a set Kit shadcn, component Separator, code 1__1.html | 9 ++++++---
...a set Kit shadcn, component Separator, code 2__1.html | 6 ++++--
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/Toolkit/bin/ux-toolkit-kit-debug b/src/Toolkit/bin/ux-toolkit-kit-debug
index 70ee0256e8a..ac16f8e2f3e 100755
--- a/src/Toolkit/bin/ux-toolkit-kit-debug
+++ b/src/Toolkit/bin/ux-toolkit-kit-debug
@@ -47,7 +47,7 @@ if (!class_exists(Application::class)) {
}
$filesystem = new Filesystem();
-$kitSynchronizer = new KitSynchronizer($filesystem, new RecipeSynchronizer($filesystem));
+$kitSynchronizer = new KitSynchronizer($filesystem, new RecipeSynchronizer());
$kitFactory = new KitFactory($filesystem, $kitSynchronizer);
(new Application())->add($command = new DebugKitCommand($kitFactory))
diff --git a/src/Toolkit/kits/shadcn/AlertDialog/manifest.json b/src/Toolkit/kits/shadcn/AlertDialog/manifest.json
index f38a2221dd8..cd1536e0eb0 100644
--- a/src/Toolkit/kits/shadcn/AlertDialog/manifest.json
+++ b/src/Toolkit/kits/shadcn/AlertDialog/manifest.json
@@ -4,6 +4,7 @@
"name": "AlertDialog",
"description": "A modal dialog that interrupts the user with important content and expects a response.",
"copy-files": {
+ "assets/": "assets/",
"templates/": "templates/"
},
"dependencies": {
diff --git a/src/Toolkit/src/Kit/KitContextRunner.php b/src/Toolkit/src/Kit/KitContextRunner.php
index e052380f221..cb7ac15d00a 100644
--- a/src/Toolkit/src/Kit/KitContextRunner.php
+++ b/src/Toolkit/src/Kit/KitContextRunner.php
@@ -105,7 +105,7 @@ public function findAnonymousComponentTemplate(string $name): ?string
{
foreach ($this->kit->getRecipes(type: RecipeType::Component) as $recipe) {
foreach ($recipe->getFiles() as $file) {
- if (str_ends_with($file->sourceRelativePathName, str_replace(':', '/', $name).'.html.twig')) {
+ if (str_ends_with($file->sourceRelativePathName, 'templates/components/'.str_replace(':', '/', $name).'.html.twig')) {
return $file->sourceRelativePathName;
}
}
diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
index 9c299dbc2b6..06641af0b69 100644
--- a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
+++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
@@ -28,14 +28,17 @@ Symfony UX
Symfony UX initiative: a JavaScript ecosystem for Symfony
-
+
+
diff --git a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html
index de0408eb053..dbd412538bf 100644
--- a/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html
+++ b/src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html
@@ -14,10 +14,12 @@
- Rendered code (prettified for testing purposes, run "php vendor/bin/phpunit -d --update-snapshots" to update snapshots): -->
Blog
-
+
+
Docs
-
+
+
Source
\ No newline at end of file