Skip to content

Commit 3b7d1f4

Browse files
committed
[Site] Update demo components paths
As mentionned in #2333, demo component classes did not follow current "default" configuration, leading to paths not in line with documentation. Easier than anticipated to fix.
1 parent 666b27c commit 3b7d1f4

31 files changed

+36
-36
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
twig_component:
22
defaults:
3-
App\Twig\: 'components/'
3+
App\Twig\Components\: 'components/'
4+
5+
# Custom namespace for MemoryDemo
46
App\LiveMemory\Component\:
57
template_directory: 'demos/live_memory/components/LiveMemory/'
68
name_prefix: 'LiveMemory:'
79

8-
9-
#anonymous_template_directory: 'demos/live_memory/components/'
1010
anonymous_template_directory: 'components/'

ux.symfony.com/src/Twig/Alert.php renamed to ux.symfony.com/src/Twig/Components/Alert.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
1515

ux.symfony.com/src/Twig/BootstrapModal.php renamed to ux.symfony.com/src/Twig/Components/BootstrapModal.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
1515

ux.symfony.com/src/Twig/DinoChart.php renamed to ux.symfony.com/src/Twig/Components/DinoChart.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Service\DinoStatsService;
1515
use Symfony\UX\Chartjs\Builder\ChartBuilderInterface;

ux.symfony.com/src/Twig/DocsLink.php renamed to ux.symfony.com/src/Twig/Components/DocsLink.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
1515
use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;

ux.symfony.com/src/Twig/FoodVote.php renamed to ux.symfony.com/src/Twig/Components/FoodVote.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Food;
1515
use App\Repository\FoodRepository;

ux.symfony.com/src/Twig/HomepageTerminalSwapper.php renamed to ux.symfony.com/src/Twig/Components/HomepageTerminalSwapper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Model\UxPackage;
1515
use App\Service\UxPackageRepository;

ux.symfony.com/src/Twig/InlineEditFood.php renamed to ux.symfony.com/src/Twig/Components/InlineEditFood.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Food;
1515
use Doctrine\ORM\EntityManagerInterface;

ux.symfony.com/src/Twig/InvoiceCreator.php renamed to ux.symfony.com/src/Twig/Components/InvoiceCreator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Invoice;
1515
use App\Entity\InvoiceItem;

ux.symfony.com/src/Twig/InvoiceCreatorLineItem.php renamed to ux.symfony.com/src/Twig/Components/InvoiceCreatorLineItem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Product;
1515
use App\Repository\ProductRepository;

ux.symfony.com/src/Twig/MealPlanner.php renamed to ux.symfony.com/src/Twig/Components/MealPlanner.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Form\MealPlannerForm;
1515
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

ux.symfony.com/src/Twig/NewCategoryForm.php renamed to ux.symfony.com/src/Twig/Components/NewCategoryForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Category;
1515
use Doctrine\ORM\EntityManagerInterface;

ux.symfony.com/src/Twig/NewProductForm.php renamed to ux.symfony.com/src/Twig/Components/NewProductForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\Category;
1515
use App\Entity\Product;

ux.symfony.com/src/Twig/ProductGrid.php renamed to ux.symfony.com/src/Twig/Components/ProductGrid.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Service\EmojiCollection;
1515
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;

ux.symfony.com/src/Twig/ProductGrid2.php renamed to ux.symfony.com/src/Twig/Components/ProductGrid2.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Service\EmojiCollection;
1515
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;

ux.symfony.com/src/Twig/RegistrationForm.php renamed to ux.symfony.com/src/Twig/Components/RegistrationForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Form\RegistrationFormType;
1515
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

ux.symfony.com/src/Twig/Terminal.php renamed to ux.symfony.com/src/Twig/Components/Terminal.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Util\SourceCleaner;
1515
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

ux.symfony.com/src/Twig/TodoListForm.php renamed to ux.symfony.com/src/Twig/Components/TodoListForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use App\Entity\TodoList;
1515
use App\Form\TodoListFormType;

ux.symfony.com/src/Twig/UploadFiles.php renamed to ux.symfony.com/src/Twig/Components/UploadFiles.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace App\Twig;
12+
namespace App\Twig\Components;
1313

1414
use Symfony\Component\HttpFoundation\File\UploadedFile;
1515
use Symfony\Component\HttpFoundation\Request;

ux.symfony.com/templates/demos/live_component/auto_validating_form.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/RegistrationForm.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/RegistrationForm.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/bootstrap.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/TodoListForm.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/TodoListForm.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/chartjs.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/DinoChart.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/DinoChart.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/dependent_form_fields.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% block code_block_full %}
44
<twig:Code:TabbedCodeBlocks :files="[
5-
'src/Twig/MealPlanner.php',
5+
'src/Twig/Components/MealPlanner.php',
66
'templates/components/MealPlanner.html.twig',
77
'src/Form/MealPlannerForm.php',
88
]" />

ux.symfony.com/templates/demos/live_component/form_collection_type.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/TodoListForm.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/TodoListForm.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/infinite_scroll.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<section class="py-5" style="padding-top: 6rem;">
2828
<div class="container container-xxl">
29-
<twig:Code:CodeWithExplanationRow filename="src/Twig/ProductGrid.php" reversed sticky style="--bs-gutter-x: 4rem;">
29+
<twig:Code:CodeWithExplanationRow filename="src/Twig/Components/ProductGrid.php" reversed sticky style="--bs-gutter-x: 4rem;">
3030
This component is quite standard: the page number as a `LiveProp`, a `LiveAction`
3131
to load the next page, and a `getItems` method to retrieve the page results.
3232

ux.symfony.com/templates/demos/live_component/inline_edit.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/InlineEditFood.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/InlineEditFood.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/invoice.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_full %}
4-
<twig:Code:CodeWithExplanationRow filename="src/Twig/InvoiceCreator.php" sticky class="pt-5">
4+
<twig:Code:CodeWithExplanationRow filename="src/Twig/Components/InvoiceCreator.php" sticky class="pt-5">
55
## Main Component
66

77
This main component keeps track of the `Invoice` (which may be new) and
@@ -30,7 +30,7 @@ data: `productId`, `quantity`, and `isEditing`. It also passes a `key`,
3030
which is needed so LiveComponents can track which row is which.
3131
</twig:Code:CodeWithExplanationRow>
3232

33-
<twig:Code:CodeWithExplanationRow filename="src/Twig/InvoiceCreatorLineItem.php" sticky class="pt-5">
33+
<twig:Code:CodeWithExplanationRow filename="src/Twig/Components/InvoiceCreatorLineItem.php" sticky class="pt-5">
3434
## Child Component
3535

3636
The child component for each "line item". This handles validating, saving,

ux.symfony.com/templates/demos/live_component/product_form.html.twig

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% endblock %}
66

77
{% block code_block_full %}
8-
<twig:Code:CodeWithExplanationRow filename="src/Twig/NewProductForm.php" sticky>
8+
<twig:Code:CodeWithExplanationRow filename="src/Twig/Components/NewProductForm.php" sticky>
99
## New Product Form
1010

1111
Live component with a form, `ValidatableComponentTrait` and a
@@ -31,7 +31,7 @@ and `data-bs-target="#new-category-modal"`.
3131
</twig:Code:CodeWithExplanationRow>
3232

3333
<twig:Code:CodeWithExplanationRow
34-
filename="src/Twig/NewCategoryForm.php" sticky
34+
filename="src/Twig/Components/NewCategoryForm.php" sticky
3535
>
3636
## New Category Form
3737

@@ -45,7 +45,7 @@ the new `Category` to the database and then does two important things:
4545
</twig:Code:CodeWithExplanationRow>
4646

4747
<twig:Code:TabbedCodeBlocks :files="[
48-
'src/Twig/BootstrapModal.php',
48+
'src/Twig/Components/BootstrapModal.php',
4949
'templates/components/BootstrapModal.html.twig',
5050
'assets/controllers/bootstrap-modal-controller.js',
5151
]" />

ux.symfony.com/templates/demos/live_component/upload.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/UploadFiles.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/UploadFiles.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/demos/live_component/voting.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'demos/live_demo.html.twig' %}
22

33
{% block code_block_left %}
4-
<twig:CodeBlock filename="src/Twig/FoodVote.php" height="400px" />
4+
<twig:CodeBlock filename="src/Twig/Components/FoodVote.php" height="400px" />
55
{% endblock %}
66

77
{% block code_block_right %}

ux.symfony.com/templates/ux_packages/twig_component.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{% endblock %}
1717

1818
{% block code_block_left %}
19-
<twig:CodeBlock filename="src/Twig/Alert.php" height="330px"/>
19+
<twig:CodeBlock filename="src/Twig/Components/Alert.php" height="330px"/>
2020
{% endblock %}
2121

2222
{% block code_block_right %}

0 commit comments

Comments
 (0)