Introduce a blacklist/whitelist for which blocks can be inserted into a column width #4904
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
Needs Decision
Needs a decision to be actionable or relevant
[Type] Enhancement
A suggestion for improvement.
With the introduction of nested blocks (#3745) one concern is that certain blocks might not be designed to work with certain column widths. An example would be that the Cover Image block is mainly designed as a full width block, but not to go inside a 1/6 column.
Allowing any block to go into any particular column width adds an additional burden on developers to ensure their block works correctly with all column widths, which in some cases is impossible. It adds control to ensure the client of a website you've developed for doesn't try and fit a square peg into a round hole.
One idea of implementation would be to introduce a new block configuration key maybe something like
columns
where if not defined, it's assumed the block works in any column width. Setting a value of[1, 2]
would mean the block can be placed in either a 1/1 or 1/2 column, but not a 3-6 width column.When you open up the block selector to add blocks to a column, either blocks which aren't compatible with that column width should either be greyed out or not shown at all. Not showing them at all probably the better solution.
The text was updated successfully, but these errors were encountered: