Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Most of time, we have same texts for both Block title & description. "Block description" is a required field, therefore users have to enter same title twice.
Proposed resolution
Present an autogenerated "Block description".
Plan A:
- similar to Add a new content types (admin/structure/types/add)
Plan B:
- add a check box next to "Block description". when it checked, hided the "Block Title" input
Comment | File | Size | Author |
---|---|---|---|
blockui.png | 12.38 KB | droplet |
Comments
Comment #1
klonosCare to explain plan A a bit further? In the add new content type form, there is a required "Name" field that also auto-generates the machine name, but the description is optional. From what I can see, we follow the same pattern in the add new custom block type form. How does fit in the block case? Perhaps things have changed since past September when this issue was filed.
Comment #2
jessebeach CreditAttribution: jessebeach commented@klonos is right, we should follow the same pattern in the block types UI that we have established in the content types UI.
The content type UI (established pattern)
I've included the code for the correct pattern as well for folks who can see the image above.
The block type UI (anti-pattern)
The code for the incorrect example is the large the same, except that the correct label name is called label label in the custom block form.
Let's keep the established pattern in place and keep the scope of this issue reigned in.
Comment #3
jessebeach CreditAttribution: jessebeach commentedupdating the title.
Comment #4
yoroy CreditAttribution: yoroy commentedYep, go for consistency here. (No need to add more descriptive verbiage though! :-)
Comment #5
webchickRemoving this from the "Spark" tag for now, since AFAIK the Spark team did not introduce this.
Seems like this is probably part of #1875252: [META] Make the block plugin UI shippable, so tagging with Blocks-Layouts.
Comment #6
benjy CreditAttribution: benjy commentedAlso related: #202837: Make it easier to customize a block title
Comment #9
tim.plunkettNot actively part of the Blocks-Layouts work.