- Issue created by @mh_nichts
- 🇫🇷France pdureau Paris
We detected this issue in 1.x, but maybe it impacts 2.x as well.
There are no variant specific or preview specific templates in UI Patterns 2
According to documentation, we can use hyphens (-) in pattern ids :
id
The root of a new pattern definition (blockquote in the example above). It must contain only lowercase characters, numbers, underscores and hyphens (i.e. it should validate against [^a-z0-9_-]+).
Cf https://www.drupal.org/docs/contributed-modules/ui-patterns/define-your-... →
However, when naming a pattern for example "collapsible-language", if we create a Twig file dedicated to a preview or a variant (ex : pattern-collapsible-language--preview.html.twig), this Twig file is not taken into account in the pattern library.
It's the base Twig file that is used.
It seems there is an error handling theme suggestions when using hyphens in pattern names : see attached screenshot.
If we replace the hyphen by an underscore in pattern id and file names, everything works well.
We detected this issue in 1.x, but maybe it impacts 2.x as well.
Active
1.0
Code
We detected this issue in 1.x, but maybe it impacts 2.x as well.
There are no variant specific or preview specific templates in UI Patterns 2