While developing a new feature usually we feel the need of having kind of a "Settings" section at block Level inside the Streamfield, this is to avoid facing the Editors to lots of fields that are not really for content just block-configuration.
We usually have a bunch of "settings" fields that are inherited across multiple blocks and it is kind of crazy that as soon as you add a new block to a streamfield the first fields you see are the non-content related and are repeated many times. It would be very nice to have a "cog" icon (next to the "duplicate" icon) that once it gets clicked it opens a section/modal/slide-in where those block-settings fields values can be defined.
Until now we've used it for:
- Block Theme dropdown
- Block Vertical Padding
- Block Width (full, boxed and so)
- Carrousel Block settings
- Video Player Block settings
- Statement Block settings like text alignment
- Image & Text Block (image size and position)
Currently we've done this in a very rawly way, it is by adding an extra css class called is-block-setting to the block field attributes and then intervene the struct_block base admin template. This way while defining our block-class we also easily define which fields should be considered/grouped as settings without writing any extra code/class.
https://github.com/wagtail/wagtail/issues/2299
https://user-images.githubusercontent.com/1500627/159998083-982a7f42-c986-4784-bbad-340e7c018e4b.png https://user-images.githubusercontent.com/1500627/159998093-dd912278-886d-4e63-8a3b-8b0876694f59.png https://user-images.githubusercontent.com/1500627/160113342-dddc09ca-f9f1-4650-9cf1-6d69ab450230.png
Here are main files involved in our implementation.