Skip to content

Commit 6f7e617

Browse files
committed
bug #3085 [Toolkit] Minor fixes (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Toolkit] Minor fixes | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 52c922e [Toolkit] Minor fixes
2 parents e755af1 + 52c922e commit 6f7e617

5 files changed

+13
-7
lines changed

src/Toolkit/bin/ux-toolkit-kit-debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if (!class_exists(Application::class)) {
4747
}
4848

4949
$filesystem = new Filesystem();
50-
$kitSynchronizer = new KitSynchronizer($filesystem, new RecipeSynchronizer($filesystem));
50+
$kitSynchronizer = new KitSynchronizer($filesystem, new RecipeSynchronizer());
5151
$kitFactory = new KitFactory($filesystem, $kitSynchronizer);
5252

5353
(new Application())->add($command = new DebugKitCommand($kitFactory))

src/Toolkit/kits/shadcn/AlertDialog/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"name": "AlertDialog",
55
"description": "A modal dialog that interrupts the user with important content and expects a response.",
66
"copy-files": {
7+
"assets/": "assets/",
78
"templates/": "templates/"
89
},
910
"dependencies": {

src/Toolkit/src/Kit/KitContextRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function findAnonymousComponentTemplate(string $name): ?string
105105
{
106106
foreach ($this->kit->getRecipes(type: RecipeType::Component) as $recipe) {
107107
foreach ($recipe->getFiles() as $file) {
108-
if (str_ends_with($file->sourceRelativePathName, str_replace(':', '/', $name).'.html.twig')) {
108+
if (str_ends_with($file->sourceRelativePathName, 'templates/components/'.str_replace(':', '/', $name).'.html.twig')) {
109109
return $file->sourceRelativePathName;
110110
}
111111
}

src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 1__1.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ <h4 class="text-sm font-medium leading-none">Symfony UX</h4>
2828
Symfony UX initiative: a JavaScript ecosystem for Symfony
2929
</p>
3030
</div>
31-
<li class="[&amp;&gt;svg]:w-3.5 [&amp;&gt;svg]:h-3.5 my-4" role="presentation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"></path></svg></li>
31+
<div class="shrink-0 bg-border h-[1px] w-full my-4" role="none">
32+
</div>
3233

3334
<div class="flex h-5 items-center space-x-4 text-sm">
3435
<a href="https://ux.symfony.com" class="hover:underline">Website</a>
35-
<li class="[&amp;&gt;svg]:w-3.5 [&amp;&gt;svg]:h-3.5 " orientation="vertical" role="presentation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"></path></svg></li>
36+
<div class="shrink-0 bg-border h-full w-[1px]" role="none">
37+
</div>
3638

3739
<a href="https://ux.symfony.com/packages" class="hover:underline">Packages</a>
38-
<li class="[&amp;&gt;svg]:w-3.5 [&amp;&gt;svg]:h-3.5 " orientation="vertical" role="presentation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"></path></svg></li>
40+
<div class="shrink-0 bg-border h-full w-[1px]" role="none">
41+
</div>
3942

4043
<a href="https://github.com/symfony/ux" class="hover:underline">Source</a>
4144
</div>

src/Toolkit/tests/Functional/__snapshots__/ComponentsRenderingTest__testComponentRendering with data set Kit shadcn, component Separator, code 2__1.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
- Rendered code (prettified for testing purposes, run "php vendor/bin/phpunit -d --update-snapshots" to update snapshots): -->
1515
<div class="flex h-5 items-center gap-4 text-sm">
1616
<div>Blog</div>
17-
<li class="[&amp;&gt;svg]:w-3.5 [&amp;&gt;svg]:h-3.5 " orientation="vertical" role="presentation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"></path></svg></li>
17+
<div class="shrink-0 bg-border h-full w-[1px]" role="none">
18+
</div>
1819

1920
<div>Docs</div>
20-
<li class="[&amp;&gt;svg]:w-3.5 [&amp;&gt;svg]:h-3.5 " orientation="vertical" role="presentation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"></path></svg></li>
21+
<div class="shrink-0 bg-border h-full w-[1px]" role="none">
22+
</div>
2123

2224
<div>Source</div>
2325
</div>

0 commit comments

Comments
 (0)