diff --git a/ux.symfony.com/assets/styles/components/_demo-container.scss b/ux.symfony.com/assets/styles/components/_demo-container.scss
index b17936b0523..84b44d2ec91 100644
--- a/ux.symfony.com/assets/styles/components/_demo-container.scss
+++ b/ux.symfony.com/assets/styles/components/_demo-container.scss
@@ -5,6 +5,16 @@
border-top-right-radius: 12px;
}
+.demo-introduction {
+ a {
+ color: var(--bs-code-color);
+ font-weight: 500;
+ }
+ code {
+ font-size: .95em;
+ }
+}
+
.demo-container-inner {
background-color: var(--bs-secondary-bg);
border: 1px solid var(--bs-secondary-bg-subtle);
diff --git a/ux.symfony.com/src/Form/MealPlannerForm.php b/ux.symfony.com/src/Form/MealPlannerForm.php
index 7e8aa1e8294..3c07ed8b0d3 100644
--- a/ux.symfony.com/src/Form/MealPlannerForm.php
+++ b/ux.symfony.com/src/Form/MealPlannerForm.php
@@ -26,6 +26,11 @@ class MealPlannerForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
+ /**
+ * Install DynamicFormBuilder:.
+ *
+ * composer require symfonycasts/dynamic-forms
+ */
$builder = new DynamicFormBuilder($builder);
$builder
diff --git a/ux.symfony.com/src/Service/LiveDemoRepository.php b/ux.symfony.com/src/Service/LiveDemoRepository.php
index abf1c5ed62a..d9c8a8e0e05 100644
--- a/ux.symfony.com/src/Service/LiveDemoRepository.php
+++ b/ux.symfony.com/src/Service/LiveDemoRepository.php
@@ -52,9 +52,8 @@ public function findAll(): array
description: 'After selecting the first field, automatically reload the options for a second field.',
route: 'app_demo_live_component_dependent_form_fields',
longDescription: <<LiveComponent
+and DynamicForms
.
EOF
),
new LiveDemo(
diff --git a/ux.symfony.com/src/Util/SourceCleaner.php b/ux.symfony.com/src/Util/SourceCleaner.php
index 8f675fc052a..9f79f2e9320 100644
--- a/ux.symfony.com/src/Util/SourceCleaner.php
+++ b/ux.symfony.com/src/Util/SourceCleaner.php
@@ -17,9 +17,14 @@ class SourceCleaner
{
public static function cleanupPhpFile(string $contents, bool $removeClass = false): string
{
- $contents = u($contents)
- ->replace("replaceMatches('/namespace[^\n]*/', '');
+ $contents = u($contents)->replace("indexOf('* This file is part of the Symfony package')) {
+ $contents = $contents->after(' */');
+ }
+
+ $contents = $contents->replaceMatches('/namespace[^\n]*/', '');
if ($removeClass) {
$contents = $contents->replaceMatches('/class[^\n]*\n{/', '')
diff --git a/ux.symfony.com/templates/components/CodeBlock.html.twig b/ux.symfony.com/templates/components/CodeBlock.html.twig
index 998d88dc571..3f0a724f45a 100644
--- a/ux.symfony.com/templates/components/CodeBlock.html.twig
+++ b/ux.symfony.com/templates/components/CodeBlock.html.twig
@@ -26,7 +26,11 @@
{{ stimulus_target('code-expander', 'expandCodeButton') }}
{{ stimulus_action('code-expander', 'expandCode') }}
style="display: none;"
- >Expand code
+ >
+