[Toolkit][Shadcn] Add form, sheet and drawer recipes#3473
Draft
Amoifr wants to merge 5 commits intosymfony:3.xfrom
Draft
[Toolkit][Shadcn] Add form, sheet and drawer recipes#3473Amoifr wants to merge 5 commits intosymfony:3.xfrom
Amoifr wants to merge 5 commits intosymfony:3.xfrom
Conversation
This was referenced Apr 18, 2026
911d2ce to
2525c88
Compare
Follow up on the review feedback on symfony#3487: the Trigger template should not enforce a specific HTML element but expose a Twig variable with the needed attributes so the consumer can pick their own element (button, link, span...). Since both `Drawer` and `Sheet` relied on native `<details>`/`<summary>` to handle open/close, replace them with `<div>`s backed by small `drawer_controller.js` and `sheet_controller.js` Stimulus controllers handling toggle, outside click and escape. Also drop four orphan snapshots (`Demo.html__1.html`, `Usage.html__1.html` for both kits) shipped by mistake and no longer generated by the test suite.
Contributor
Author
|
Reworked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi 👋
Three more recipes from #3233 (previous batches: #3464, #3466, #3467, #3468, #3469). Still JS-free:
Form,Form:Item,Form:Label,Form:Description,Form:Message. No state, just composition. TheForm:Labelpicks up the destructive color when aForm:Messageis present in the same item viagroup-has-[[data-slot=form-message]]:text-destructive.<details>/<summary>(same pattern as thepopoverrecipe in [Toolkit][Shadcn] Add menubar and popover recipes #3468). Accepts asideprop (right/left/top/bottom), plusSheet:Trigger,Sheet:Content,Sheet:Header,Sheet:Title,Sheet:Descriptionsub-components.<details>/<summary>approach, with a drag-handle visual andDrawer:Trigger,Drawer:Content,Drawer:Header,Drawer:Title,Drawer:Description,Drawer:Footersub-components.Note: shadcn's official Sheet and Drawer rely on Radix / Vaul for focus-trapping, drag-to-dismiss and backdrop-click dismiss, which all require JS. These recipes ship the pragmatic static variants — happy to drop either if you would rather wait for JS-powered versions.
Each recipe has
Usage.html.twig,Demo.html.twig, and passing snapshot tests.Thanks! 🙏