I've noticed that when one create a custom block, the twig naming template suggestion is taken from the description of the block. The problem is that spaces are removed. is it possible to replace space to hyphen? I think it's important to make the twig template more readable.
if i create a custom block with the description "home page section free software". space are removed and the twig template naming suggestion will be:
block--homepagesectionfreesoftware.html.twig
i will be mutch more readable if space are remplaced with "- ", for the twig template naming suggestion to be:
block--home-page-section-free-software.html.twig
For now i've found a work around by replacing space with underscore in the block description at the creation. Exemple: if block description "home_page_section_free_software", the template naming suggestion is:
block--home-page-section-free-software.html.twig
I'am also aware of the module "block content machine name" https://www.drupal.org/project/block_content_machine_name → . But i think that feature should be in core. More than that , that module cause several naming problem that i will not expose here.
Add change record
Add release note snippet
Machine names are created a bit differently.
None
None
@todo
Needs work
11.0 🔥
block.module
It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.