Skip to content

Commit a933883

Browse files
committed
[Site] Updating to new component naming convention
1 parent 08f8285 commit a933883

29 files changed

+92
-94
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ component('alert', {
1+
{{ component('Alert', {
22
type: 'danger',
33
message: 'Oh no! The dinos escaped!',
44
}) }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{ component('alert', {
1+
{{ component('Alert', {
22
message: 'I am a success alert!',
33
}) }}

ux.symfony.com/src/Controller/LiveComponentDemoController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use App\Entity\TodoItem;
66
use App\Entity\TodoList;
7-
use App\Form\TodoListForm;
7+
use App\Form\TodoListFormType;
88
use App\Repository\FoodRepository;
99
use App\Repository\TodoListRepository;
1010
use App\Service\LiveDemoRepository;
@@ -31,7 +31,7 @@ public function demoFormCollectionType(LiveDemoRepository $liveDemoRepository, R
3131
$todoList = new TodoList();
3232
$todoList->addTodoItem(new TodoItem());
3333
}
34-
$form = $this->createForm(TodoListForm::class, $todoList);
34+
$form = $this->createForm(TodoListFormType::class, $todoList);
3535
$form->handleRequest($request);
3636

3737
if ($form->isSubmitted() && $form->isValid()) {

ux.symfony.com/templates/components/SearchPackages.html.twig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
class="form-control"
77
>
88

9-
<input type="checkbox" data-payload="5" value="hi">
10-
119
{% if computed.packages|length > 0 %}
1210
<div data-loading="addClass(opacity-50)" class="mt-3 row">
1311
{% for package in computed.packages %}

ux.symfony.com/templates/liveDemoTabsBase.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<div class="terminal-code">
66
<ul class="nav nav-tabs">
77
<li class="nav-item" role="presentation">
8-
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#demo_component" type="button" role="tab" aria-controls="demo_component" aria-selected="true">src/Twig/MealPlannerComponent.php</button>
8+
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#demo_component" type="button" role="tab" aria-controls="demo_component" aria-selected="true">src/Twig/MealPlanner.php</button>
99
</li>
1010
<li class="nav-item" role="presentation">
11-
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#demo_template" type="button" role="tab" aria-controls="demo_template">templates/components/meal_planner.html.twig</button>
11+
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#demo_template" type="button" role="tab" aria-controls="demo_template">templates/components/MealPlanner.html.twig</button>
1212
</li>
1313
<li class="nav-item" role="presentation">
1414
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#demo_form" type="button" role="tab" aria-controls="demo_form">src/Form/MealPlannerForm.php</button>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'packageBase.html.twig' %}
22

33
{% block component_header %}
4-
{% component package_header with {
4+
{% component PackageHeader with {
55
package: package,
66
eyebrowText: 'Reactive Twig Templates'
77
} %}
@@ -18,17 +18,17 @@
1818
{% endblock %}
1919

2020
{% block code_block_left %}
21-
{% component code_block with { filename: 'src/Twig/SearchPackagesComponent.php' } %}
21+
{% component CodeBlock with { filename: 'src/Twig/SearchPackages.php' } %}
2222
{% block content %}
23-
{{- source('@src/Twig/SearchPackagesComponent.php')|cleanup_php_file -}}
23+
{{- source('@src/Twig/SearchPackages.php')|cleanup_php_file -}}
2424
{% endblock %}
2525
{% endcomponent %}
2626
{% endblock %}
2727

2828
{% block code_block_right %}
29-
{% component code_block with { filename: 'templates/components/search_packages.html.twig' } %}
29+
{% component CodeBlock with { filename: 'templates/components/SearchPackages.html.twig' } %}
3030
{% block content %}
31-
{{- source('@code_snippets/_search_packages.html.twig') -}}
31+
{{- source('@code_snippets/_SearchPackages.html.twig') -}}
3232
{% endblock %}
3333
{% endcomponent %}
3434
{% endblock %}
@@ -37,7 +37,7 @@
3737
Live Components
3838
{% endblock %}
3939
{% block demo_content %}
40-
{{ component('search_packages') }}
40+
{{ component('SearchPackages') }}
4141

4242
<div class="d-flex eyebrows pt-5">
4343
<div>Automatic debouncing</div>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{% extends 'liveDemoBase.html.twig' %}
22

33
{% block code_block_left %}
4-
{% component code_block with { filename: 'src/Twig/RegistrationFormComponent.php', height: '400px' } %}
4+
{% component CodeBlock with { filename: 'src/Twig/RegistrationForm.php', height: '400px' } %}
55
{% block content %}
6-
{{- source('@src/Twig/RegistrationFormComponent.php')|cleanup_php_file -}}
6+
{{- source('@src/Twig/RegistrationForm.php')|cleanup_php_file -}}
77
{% endblock %}
88
{% endcomponent %}
99
{% endblock %}
1010

1111
{% block code_block_right %}
12-
{% component code_block with { filename: 'templates/components/registration_form.html.twig', height: '400px' } %}
12+
{% component CodeBlock with { filename: 'templates/components/RegistrationForm.html.twig', height: '400px' } %}
1313
{% block content %}
14-
{{- source('components/registration_form.html.twig') -}}
14+
{{- source('components/RegistrationForm.html.twig') -}}
1515
{% endblock %}
1616
{% endcomponent %}
1717
{% endblock %}
1818

1919
{% block demo_content %}
20-
{{ component('registration_form') }}
20+
{{ component('RegistrationForm') }}
2121
{% endblock %}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{% extends 'liveDemoBase.html.twig' %}
22

33
{% block code_block_left %}
4-
{% component code_block with { filename: 'src/Twig/DinoChartComponent.php', height: '400px' } %}
4+
{% component CodeBlock with { filename: 'src/Twig/DinoChart.php', height: '400px' } %}
55
{% block content %}
6-
{{- source('@src/Twig/DinoChartComponent.php')|cleanup_php_file -}}
6+
{{- source('@src/Twig/DinoChart.php')|cleanup_php_file -}}
77
{% endblock %}
88
{% endcomponent %}
99
{% endblock %}
1010

1111
{% block code_block_right %}
12-
{% component code_block with { filename: 'templates/components/dino_chart.html.twig', height: '400px' } %}
12+
{% component CodeBlock with { filename: 'templates/components/DinoChart.html.twig', height: '400px' } %}
1313
{% block content %}
14-
{{- source('components/dino_chart.html.twig') -}}
14+
{{- source('components/DinoChart.html.twig') -}}
1515
{% endblock %}
1616
{% endcomponent %}
1717
{% endblock %}
1818

1919
{% block demo_content %}
20-
{{ component('dino_chart') }}
20+
{{ component('DinoChart') }}
2121
{% endblock %}

ux.symfony.com/templates/live_component_demo/dependent_form_fields.html.twig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
{% block demo_code_tabs %}
44
<div class="tab-pane show active" id="demo_component">
5-
{% component code_block with { filename: 'src/Twig/MealPlannerComponent.php', showFilename: false, height: '300px' } %}
5+
{% component CodeBlock with { filename: 'src/Twig/MealPlanner.php', showFilename: false, height: '300px' } %}
66
{% block content %}
7-
{{- source('@src/Twig/MealPlannerComponent.php')|cleanup_php_file -}}
7+
{{- source('@src/Twig/MealPlanner.php')|cleanup_php_file -}}
88
{% endblock %}
99
{% endcomponent %}
1010
</div>
1111
<div class="tab-pane" id="demo_template">
12-
{% component code_block with { filename: 'templates/components/meal_planner.html.twig', showFilename: false, height: '300px' } %}
12+
{% component CodeBlock with { filename: 'templates/components/MealPlanner.html.twig', showFilename: false, height: '300px' } %}
1313
{% block content %}
14-
{{- source('components/meal_planner.html.twig') -}}
14+
{{- source('components/MealPlanner.html.twig') -}}
1515
{% endblock %}
1616
{% endcomponent %}
1717
</div>
1818
<div class="tab-pane" id="demo_form">
19-
{% component code_block with { filename: 'src/Form/MealPlannerForm.php', showFilename: false, height: '300px' } %}
19+
{% component CodeBlock with { filename: 'src/Form/MealPlannerForm.php', showFilename: false, height: '300px' } %}
2020
{% block content %}
2121
{{- source('@src/Form/MealPlannerForm.php')|cleanup_php_file -}}
2222
{% endblock %}
@@ -25,5 +25,5 @@
2525
{% endblock %}
2626

2727
{% block demo_content %}
28-
{{ component('meal_planner') }}
28+
{{ component('MealPlanner') }}
2929
{% endblock %}

0 commit comments

Comments
 (0)