My Single Directory Components Workflow
summary
Claim: Single Directory Components (SDCs) map cleanly to modern component ideas and speed Drupal theming, but they keep some old constraints (schema enforcement can fatal‑error, CKEditor blocks custom elements). Workflow: prototype in Astro prototype (bolt.new + AI for markup/styles), then drop a card into a theme as a component folder with card.component.yaml (JSON schema), card.twig, card.css and card.js. Built a retro card component upgraded to a web component, integrated with props/slots and contrib modules; it mostly works with no build step required.
AI-written summary · about
chapters (16)
- 0:00Introduction and speaker intro
- 2:54What are single directory components
- 8:58Prototyping outside Drupal
- 16:47Props and slots in SDCs
- 27:08Integrating SDCs into Drupal
- 31:55Defining slots in SDCs
- 34:04Defining props in SDCs
- 37:40Adding JavaScript to SDCs
- 39:04SDC workflow summary
- 41:12Build process and SDCs
- 43:00Indispensable contrib tools
- 45:27Props vs slots best practices
- 46:28Advanced build process setup
- 47:10SDCs and CKEditor limitations
- 47:52Future of SDCs and experience Builder
- 48:35Q&A and closing remarks
