- Issue created by @smustgrave
- πͺπΈSpain idiaz.roncero Madrid
+1 - it makes sense slots might be required for some components
Per the slack conversation https://drupal.slack.com/archives/C03MFN4D40J/p1726602273291509
We are ignoring required key in slots in purpose. We acknowledge it is a part of SDC definition format, but we believe it is a bad practice. You can create an issue for beta3 if you want to discuss the inclusion of this "feature".
The argument I would make about bring it back if there are definitely scenarios where a component will not work if a slot is missing, example an accordion item without a title. Without the required validation a site builder won't know their component is broken until after safe and previewing, when this probably could of been caught earlier. Thinking from the UI standpoint for this argument.
But even in twig if, as a developer, I got an exception that a required slot is missing that seems more clear then having to debug why a component is broken.
N/A
Use the required key that SDC slots already offers.
Discuss
TBD
TBD
Active
2.0
Code
+1 - it makes sense slots might be required for some components