From 55a30692ec264ba9a14749a45f493680d1026efc Mon Sep 17 00:00:00 2001
From: Hugo Alliaume
Date: Thu, 18 Sep 2025 13:56:52 +0200
Subject: [PATCH] [Toolkit] Minor fixes
---
bin/ux-toolkit-kit-debug | 2 +-
kits/shadcn/AlertDialog/manifest.json | 1 +
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/bin/ux-toolkit-kit-debug b/bin/ux-toolkit-kit-debug
index 70ee025..ac16f8e 100755
--- a/bin/ux-toolkit-kit-debug
+++ b/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/kits/shadcn/AlertDialog/manifest.json b/kits/shadcn/AlertDialog/manifest.json
index f38a222..cd1536e 100644
--- a/kits/shadcn/AlertDialog/manifest.json
+++ b/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/Kit/KitContextRunner.php b/src/Kit/KitContextRunner.php
index e052380..cb7ac15 100644
--- a/src/Kit/KitContextRunner.php
+++ b/src/Kit/KitContextRunner.php
@@ -105,7 +105,7 @@ final class KitContextRunner
{
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/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html b/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
index 9c299db..06641af 100644
--- a/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
+++ b/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html
@@ -28,14 +28,17 @@
Symfony UX initiative: a JavaScript ecosystem for Symfony
-
+
+
diff --git a/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html b/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html
index de0408e..dbd4125 100644
--- a/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html
+++ b/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