-
-
Notifications
You must be signed in to change notification settings - Fork 383
[Toolkit] Rework recipe name #3107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc01380
to
9735dff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors recipe naming in the Symfony UX Toolkit by introducing a kebab-case naming convention and adding a dedicated name field to recipes. The changes make component installation more command-line friendly by using kebab-case identifiers while preserving human-readable display names.
- Adds a
name
field to Recipe objects based on folder names in kebab-case format - Updates recipe folder structure from PascalCase to kebab-case
- Modifies command syntax to use kebab-case recipe names (e.g.,
alert-dialog
instead ofAlert Dialog
)
Reviewed Changes
Copilot reviewed 29 out of 102 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Toolkit/src/Recipe/Recipe.php | Adds name field to Recipe constructor |
src/Toolkit/src/Recipe/RecipeSynchronizer.php | Updates recipe creation to use folder basename as name |
src/Toolkit/src/Kit/Kit.php | Refactors recipe storage to use name as key instead of manifest name |
src/Toolkit/src/Command/InstallCommand.php | Updates command examples and messaging to use kebab-case naming |
ux.symfony.com/templates/toolkit/_kit_aside.html.twig | Updates navigation to use recipe name instead of manifest name |
Multiple test files | Updates test fixtures and assertions for kebab-case naming |
src/Toolkit/kits/shadcn/alert-dialog/ | Example of folder renaming from AlertDialog to alert-dialog |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
55853e6
to
f06e725
Compare
f06e725
to
a82b03b
Compare
69da901
to
edec8f7
Compare
edec8f7
to
60a6b78
Compare
Had to merge through GUI because:
|
# Via Hugo Alliaume (2) and GitHub (1) * 2.x: [Toolkit] Rework recipe name (#3107) [CI] Remove duplicated matrix entry for Symfony version in unit-tests.yaml Remove explicit configuration `twig.exception_controller` from Kernel for testing # Conflicts: # .github/workflows/unit-tests.yaml # src/LazyImage/tests/Kernel/TwigAppKernel.php # src/TogglePassword/tests/Kernel/TwigAppKernel.php # ux.symfony.com/importmap.php
This PR introduce a new field "name" for Recipe (based on Recipe's folder name), and change the case of Recipe folders from PascalCase to kebab-case, in order to make things more friendly.
With this new field:
bin/console ux:install "Alert Dialog" --kit shadcn
becomesbin/console ux:install alert-dialog --kit shadcn
ux.symfony.com/toolkit/kits/shadcn/components/Alert%20Dialog
becomesux.symfony.com/toolkit/kits/shadcn/components/alert-dialog