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 %}

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

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

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

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

1919
{% block demo_content %}
20-
{{ component('todo_list_form', {
20+
{{ component('TodoListForm', {
2121
form: form,
2222
todoList: todoList
2323
}) }}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{% extends 'liveDemoBase.html.twig' %}
22

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

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

1919
{% block demo_content %}
20-
{{ component('inline_edit_food', {
20+
{{ component('InlineEditFood', {
2121
food: food
2222
}) }}
2323
{% endblock %}

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

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

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

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

1919
{% block demo_content %}
2020
<table class="table">
2121
{% for food in foods %}
22-
{{ component('food_vote', {
22+
{{ component('FoodVote', {
2323
food: food
2424
}) }}
2525
{% endfor %}

ux.symfony.com/templates/main/_documentationLinks.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="container-fluid container-xxl mt-5 p-5" style="background-color: #F2F2F2;">
22
<div class="row">
33
<div class="col-12 col-sm-6 col-md-4">
4-
{{ component('docs_link', {
4+
{{ component('DocsLink', {
55
url: package.officialDocsUrl,
66
title: 'Symfony UX '~package.humanName~' Docs',
77
text: 'Get going with the official documentation.'
@@ -10,7 +10,7 @@
1010

1111
{% if package.screencastLink %}
1212
<div class="col-12 col-sm-6 col-md-4 mt-3 mt-md-0">
13-
{{ component('docs_link', {
13+
{{ component('DocsLink', {
1414
url: package.screencastLink,
1515
title: 'Screencasts',
1616
text: package.screencastLinkText
@@ -20,7 +20,7 @@
2020

2121
{% if package.docsLink %}
2222
<div class="col-12 col-sm-6 col-md-4 mt-3 mt-md-0">
23-
{{ component('docs_link', {
23+
{{ component('DocsLink', {
2424
url: package.docsLink,
2525
title: 'Related Docs',
2626
text: package.docsLinkText

ux.symfony.com/templates/main/_installTerminal.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h2 class="ubuntu text-center mt-5">Install It</h2>
22
<div class="d-flex justify-content-center mt-5">
33
<div class="col-12 col-md-6">
4-
{% component terminal with { bottomPadding: 20 } %}
4+
{% component Terminal with { bottomPadding: 20 } %}
55
{% block content %}
66
composer require ux {{ package.composerName }}
77
npm install --force

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<div class="container-fluid container-xxl mt-5 p-5" style="background-color: #F2F2F2;">
1616
<div class="d-sm-flex justify-content-center">
1717
<div class="me-sm-2" style="width: 400px;">
18-
{{ component('docs_link', {
18+
{{ component('DocsLink', {
1919
url: 'https://symfonycasts.com/screencast/stimulus',
2020
title: 'Screencasts',
2121
text: 'Jump right into with the Symfony UX & Stimulus screencast.'
2222
}) }}
2323
</div>
2424
<div class="mt-3 mt-sm-0 ms-sm-2" style="width: 400px;">
25-
{{ component('docs_link', {
25+
{{ component('DocsLink', {
2626
url: 'https://symfony.com/doc/current/frontend/ux.html',
2727
title: 'Documentation',
2828
text: 'Ready to get started? The official symfony.com UX Docs.'

ux.symfony.com/templates/main/homepage.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<p>A set of PHP & JavaScript packages to solve every day frontend problems featuring Stimulus and Turbo.</p>
1111
</div>
1212
<div class="col-12 col-sm-8 col-lg-6">
13-
{{ component('homepage_terminal_swapper') }}
13+
{{ component('HomepageTerminalSwapper') }}
1414
</div>
1515
</div>
1616
</div>
@@ -22,7 +22,7 @@
2222

2323
<div class="row">
2424
<div class="col-12 col-md-6">
25-
{% component terminal %}
25+
{% component Terminal %}
2626
{% block content %}
2727
composer require symfony/webpack-encore-bundle
2828
npm install
@@ -54,14 +54,14 @@
5454

5555
<div class="row">
5656
<div class="col-12 col-md-6">
57-
{% component code_block with { filename: 'templates/anything.html.twig' } %}
57+
{% component CodeBlock with { filename: 'templates/anything.html.twig' } %}
5858
{% block content %}
5959
{{- source('@code_snippets/_markdown.html.twig') -}}
6060
{% endblock %}
6161
{% endcomponent %}
6262
</div>
6363
<div class="col-12 col-md-6 mt-3 mt-md-0">
64-
{% component code_block with { filename: 'assets/controllers/markdown_controller.js' } %}
64+
{% component CodeBlock with { filename: 'assets/controllers/markdown_controller.js' } %}
6565
{% block content %}
6666
{{- source('@assets/controllers/markdown-controller.js') -}}
6767
{% endblock %}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% block body %}
44

5-
{% component package_header with {
5+
{% component PackageHeader with {
66
package: package,
77
eyebrowText: 'Speed of an SPA',
88
withChatIcon: true

0 commit comments

Comments
 (0)