Skip to content

[Toolkit] Rework recipe name - #3107

Merged
Kocal merged 2 commits into
symfony:2.xfrom
Kocal:toolkit-rework-recipe-name
Sep 27, 2025
Merged

Kocal merged 2 commits into
symfony:2.xfrom
Kocal:toolkit-rework-recipe-name

Conversation

@Kocal

@Kocal Kocal commented Sep 27, 2025 •

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? no
Issues Fix #...
License MIT

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 becomes bin/console ux:install alert-dialog --kit shadcn
  • ux.symfony.com/toolkit/kits/shadcn/components/Alert%20Dialog becomes ux.symfony.com/toolkit/kits/shadcn/components/alert-dialog

@Kocal Kocal self-assigned this Sep 27, 2025
@carsonbot carsonbot added Feature New Feature Toolkit Status: Needs Review Needs to be reviewed labels Sep 27, 2025
@Kocal
Kocal force-pushed the toolkit-rework-recipe-name branch 2 times, most recently from cc01380 to 9735dff Compare September 27, 2025 08:45
@Kocal
Kocal requested a review from Copilot September 27, 2025 08:46

Copilot AI left a comment

Copy link
Copy Markdown

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 of Alert 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.

@Kocal
Kocal force-pushed the toolkit-rework-recipe-name branch 2 times, most recently from 55853e6 to f06e725 Compare September 27, 2025 08:57
@Kocal
Kocal force-pushed the toolkit-rework-recipe-name branch from f06e725 to a82b03b Compare September 27, 2025 09:07
@Kocal

Kocal commented Sep 27, 2025 •

Copy link
Copy Markdown
Member Author

Interesting, the CI fails to find recipe like alert or button, because it still think directories Toolkit/kits/shadcn/Alert or Toolkit/kits/shadcn/Button exist:
image

Note that alert-dialog is correctly understood, since a - has been added and it does not make case conflict:
image

Not sure what's the best solution here, does the runner has some filesystem cache when running actions/checkout@v4? We use actions/cache@v4 for caching the Composer directory (composer config cache-files-dir) but I don't think it could be the cause.

EDIT: thanks to GPT, that's in fact related to git itself with tends to ignore case, I will find a workaround.

@Kocal
Kocal force-pushed the toolkit-rework-recipe-name branch from 69da901 to edec8f7 Compare September 27, 2025 09:28
@Kocal
Kocal force-pushed the toolkit-rework-recipe-name branch from edec8f7 to 60a6b78 Compare September 27, 2025 09:31
@Kocal
Kocal merged commit 269016e into symfony:2.x Sep 27, 2025
28 of 29 checks passed
@Kocal
Kocal deleted the toolkit-rework-recipe-name branch September 27, 2025 10:36
@Kocal

Kocal commented Sep 27, 2025

Copy link
Copy Markdown
Member Author

Had to merge through GUI because:


Working on symfony/ux (branch 2.x)
Merging Pull Request 3107: Kocal/toolkit-rework-recipe-name
Unable to switch to the <comment>2.x</comment> branch!

In ProcessHelper.php line 102:
                                                                                          
  The command "'git' 'checkout' '2.x'" failed.                                            
                                                                                          
  Exit Code: 1(General error)                                                             
                                                                                          
  Working directory: /Users/kocal/workspace-os/symfony-ux                                 
                                                                                          
  Output:                                                                                 
  ================                                                                        
                                                                                          
                                                                                          
  Error Output:                                                                           
  ================                                                                        
  error: The following untracked working tree files would be overwritten by checkout:     
        src/Toolkit/kits/shadcn/Alert/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Alert/manifest.json                                             
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert.html.twig                      
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert/Description.html.twig          
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert/Title.html.twig                
        src/Toolkit/kits/shadcn/Avatar/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Avatar/manifest.json                                            
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar.html.twig                    
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar/Image.html.twig              
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar/Text.html.twig               
        src/Toolkit/kits/shadcn/Badge/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Badge/manifest.json                                             
        src/Toolkit/kits/shadcn/Badge/templates/components/Badge.html.twig                      
        src/Toolkit/kits/shadcn/Breadcrumb/EXAMPLES.md                                          
        src/Toolkit/kits/shadcn/Breadcrumb/manifest.json                                        
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb.html.twig            
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Ellipsis.html.twig   
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Item.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Link.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/List.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Page.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Separator.html.twig  
        src/Toolkit/kits/shadcn/Button/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Button/manifest.json                                            
        src/Toolkit/kits/shadcn/Button/templates/components/Button.html.twig                    
        src/Toolkit/kits/shadcn/Card/EXAMPLES.md                                                
        src/Toolkit/kits/shadcn/Card/manifest.json                                              
        src/Toolkit/kits/shadcn/Card/templates/components/Card.html.twig                        
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Content.html.twig                
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Description.html.twig            
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Footer.html.twig                 
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Header.html.twig                 
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Title.html.twig                  
        src/Toolkit/kits/shadcn/Checkbox/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Checkbox/manifest.json                                          
        src/Toolkit/kits/shadcn/Checkbox/templates/components/Checkbox.html.twig                
        src/Toolkit/kits/shadcn/Input/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Input/manifest.json                                             
        src/Toolkit/kits/shadcn/Input/templates/components/Input.html.twig                      
        src/Toolkit/kits/shadcn/Label/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Label/manifest.json                                             
        src/Toolkit/kits/shadcn/Label/templates/components/Label.html.twig                      
        src/Toolkit/kits/shadcn/Pagination/EXAMPLES.md                                          
        src/Toolkit/kits/shadcn/Pagination/manifest.json                                        
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination.html.twig            
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Content.html.twig    
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Ellipsis.html.twig   
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Item.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Link.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Next.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Previous.html.twig   
        src/Toolkit/kits/shadcn/Progress/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Progress/manifest.json                                          
        src/Toolkit/kits/shadcn/Progress/templates/components/Progress.html.twig                
        src/Toolkit/kits/shadcn/Select/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Select/manifest.json                                            
        src/Toolkit/kits/shadcn/Select/templates/components/Select.html.twig                    
        src/Toolkit/kits/shadcn/Separator/EXAMPLES.md                                           
        src/Toolkit/kits/shadcn/Separator/manifest.json                                         
        src/Toolkit/kits/shadcn/Separator/templates/components/Separator.html.twig              
        src/Toolkit/kits/shadcn/Skeleton/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Skeleton/manifest.json                                          
        src/Toolkit/kits/shadcn/Skeleton/templates/components/Skeleton.html.twig                
        src/Toolkit/kits/shadcn/Switch/EXAM                                                     
  Aborting                                                                                
                                                                                          

merge [-s|--switch SWITCH] [--no-commit] [--force-squash] [--] <number>

➜  symfony-ux git:(toolkit-rework-recipe-name) ga . && gc --amend --no-edit && git push --force
➜  symfony-ux git:(toolkit-rework-recipe-name) git config core.ignorecase false
➜  symfony-ux git:(toolkit-rework-recipe-name) git config --global core.ignorecase false
➜  symfony-ux git:(toolkit-rework-recipe-name) sf-gh merge 3107                         
Working on symfony/ux (branch 2.x)
Merging Pull Request 3107: Kocal/toolkit-rework-recipe-name
Unable to switch to the <comment>2.x</comment> branch!

In ProcessHelper.php line 102:
                                                                                          
  The command "'git' 'checkout' '2.x'" failed.                                            
                                                                                          
  Exit Code: 1(General error)                                                             
                                                                                          
  Working directory: /Users/kocal/workspace-os/symfony-ux                                 
                                                                                          
  Output:                                                                                 
  ================                                                                        
                                                                                          
                                                                                          
  Error Output:                                                                           
  ================                                                                        
  error: The following untracked working tree files would be overwritten by checkout:     
        src/Toolkit/kits/shadcn/Alert/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Alert/manifest.json                                             
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert.html.twig                      
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert/Description.html.twig          
        src/Toolkit/kits/shadcn/Alert/templates/components/Alert/Title.html.twig                
        src/Toolkit/kits/shadcn/Avatar/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Avatar/manifest.json                                            
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar.html.twig                    
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar/Image.html.twig              
        src/Toolkit/kits/shadcn/Avatar/templates/components/Avatar/Text.html.twig               
        src/Toolkit/kits/shadcn/Badge/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Badge/manifest.json                                             
        src/Toolkit/kits/shadcn/Badge/templates/components/Badge.html.twig                      
        src/Toolkit/kits/shadcn/Breadcrumb/EXAMPLES.md                                          
        src/Toolkit/kits/shadcn/Breadcrumb/manifest.json                                        
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb.html.twig            
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Ellipsis.html.twig   
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Item.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Link.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/List.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Page.html.twig       
        src/Toolkit/kits/shadcn/Breadcrumb/templates/components/Breadcrumb/Separator.html.twig  
        src/Toolkit/kits/shadcn/Button/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Button/manifest.json                                            
        src/Toolkit/kits/shadcn/Button/templates/components/Button.html.twig                    
        src/Toolkit/kits/shadcn/Card/EXAMPLES.md                                                
        src/Toolkit/kits/shadcn/Card/manifest.json                                              
        src/Toolkit/kits/shadcn/Card/templates/components/Card.html.twig                        
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Content.html.twig                
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Description.html.twig            
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Footer.html.twig                 
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Header.html.twig                 
        src/Toolkit/kits/shadcn/Card/templates/components/Card/Title.html.twig                  
        src/Toolkit/kits/shadcn/Checkbox/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Checkbox/manifest.json                                          
        src/Toolkit/kits/shadcn/Checkbox/templates/components/Checkbox.html.twig                
        src/Toolkit/kits/shadcn/Input/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Input/manifest.json                                             
        src/Toolkit/kits/shadcn/Input/templates/components/Input.html.twig                      
        src/Toolkit/kits/shadcn/Label/EXAMPLES.md                                               
        src/Toolkit/kits/shadcn/Label/manifest.json                                             
        src/Toolkit/kits/shadcn/Label/templates/components/Label.html.twig                      
        src/Toolkit/kits/shadcn/Pagination/EXAMPLES.md                                          
        src/Toolkit/kits/shadcn/Pagination/manifest.json                                        
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination.html.twig            
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Content.html.twig    
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Ellipsis.html.twig   
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Item.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Link.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Next.html.twig       
        src/Toolkit/kits/shadcn/Pagination/templates/components/Pagination/Previous.html.twig   
        src/Toolkit/kits/shadcn/Progress/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Progress/manifest.json                                          
        src/Toolkit/kits/shadcn/Progress/templates/components/Progress.html.twig                
        src/Toolkit/kits/shadcn/Select/EXAMPLES.md                                              
        src/Toolkit/kits/shadcn/Select/manifest.json                                            
        src/Toolkit/kits/shadcn/Select/templates/components/Select.html.twig                    
        src/Toolkit/kits/shadcn/Separator/EXAMPLES.md                                           
        src/Toolkit/kits/shadcn/Separator/manifest.json                                         
        src/Toolkit/kits/shadcn/Separator/templates/components/Separator.html.twig              
        src/Toolkit/kits/shadcn/Skeleton/EXAMPLES.md                                            
        src/Toolkit/kits/shadcn/Skeleton/manifest.json                                          
        src/Toolkit/kits/shadcn/Skeleton/templates/components/Skeleton.html.twig                
        src/Toolkit/kits/shadcn/Switch/EXAM                                                     
  Aborting                                                                                
                                                                                          

merge [-s|--switch SWITCH] [--no-commit] [--force-squash] [--] <number>

Kocal added a commit that referenced this pull request Sep 27, 2025
# 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
smnandre pushed a commit to smnandre/ux that referenced this pull request Jan 4, 2026
Kocal added a commit that referenced this pull request May 11, 2026
…nt Shadcn UI recipes (Amoifr)

This PR was squashed before being merged into the 3.x branch.

Discussion
----------

[Toolkit] Populate `version-added` on Flowbite 4 and recent Shadcn UI recipes

| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | no
| Deprecations?  | no
| Issues         | Fix #3509
| License        | MIT

Follow-up to #3531 (which added the `version-added` schema entry): this populates the field for the most recent recipes, so [ux.symfony.com](https://ux.symfony.com) can surface the required Toolkit version to users — the original use case behind #3509.

Two commits, one per period, so the second can be dropped if reviewers prefer to wait for the 3.0 tag:

- `[Toolkit] Populate version-added for Flowbite 4 and recent Shadcn UI recipes` — 24 manifests:
  - `2.33` — `shadcn/{accordion,tabs,tooltip}`
  - `2.35` — `shadcn/toggle` + the 20 Flowbite 4 recipes released with 2.35 (`alert`, `badge`, `button`, `button-group`, `card`, `checkbox`, `indicator`, `input`, `kbd`, `label`, `modal`, `pagination`, `radio`, `select`, `skeleton`, `spinner`, `table`, `tabs`, `textarea`, `toggle`)
- `[Toolkit] Mark unreleased Flowbite 4 and Shadcn UI recipes as added in 3.0` — 8 manifests only present on `3.x`:
  - `flowbite-4/{avatar,dropdown}`
  - `shadcn/{collapsible,hover-card,radio-group,resizable,toggle-group,typography}`

Versions were determined by checking each recipe's presence at the corresponding git tag (e.g. `git ls-tree -r v2.33.0 -- src/Toolkit/kits/`), to avoid being misled by the 2.32 → 2.33 kits reshuffle (#3107) which would have made `git log --follow` unreliable.

Happy to split, narrow scope (e.g. drop the 3.0 commit until release), or change the version format (e.g. `2.35.0` instead of `2.35`) — whatever fits best!

Commits
-------

05cf878 [Toolkit] Populate `version-added` on Flowbite 4 and recent Shadcn UI recipes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New Feature Status: Needs Review Needs to be reviewed Toolkit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants