Patterns are a great way to package markup, CSS and JS together. While using it for big bunch of markup with a lot of variables, I'd like to also be able to use it to manage some atoms like a really simple static button. I could use another method but I like consistency and it seem to me totally legit to use a Pattern to do that. The thing is that it's not allowed to create a pattern without any field.
To change this we just have to edit \Drupal\ui_patterns\TypedData\PatternDataDefinition::getPropertyDefinitions() and remove the
setRequired() call for the fields.
Patterns are a great way to package markup, CSS and JS together. While using it for big bunch of markup with a lot of variables, I'd like to also be able to use it to manage some atoms like a really simple static button. I could use another method but I like consistency and it seem to me totally legit to use a Pattern to do that. The thing is that it's not allowed to create a pattern without any field.
To change this we just have to edit
\Drupal\ui_patterns\TypedData\PatternDataDefinition::getPropertyDefinitions()
and remove thesetRequired()
call for the fields.What do you think about this ?