You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently there has been somechatter around the impracticality of selecting and working with container blocks and their children.
Even with the additional outline effects we added in the Site Editor, selecting a container block sometimes requires too much cursor precision and feels finicky (technical term :D). In some situations it is outright impossible... in the gif below I fight valiantly to select the Columns block inside the Header Template Part in tt1-blocks, before giving up and having to use the parent selector on one of the single Column blocks:
Click through to edit
In #27852 (comment) I explored a potential solution to this problem for Template Parts that involves the user having to click "through" the container to select the children. Similar to how selecting child blocks in "Select" mode works, or how you might select the contents of a "group" in software like Sketch or Figma.
I'm wondering if we might instead implement a reduced version of the above to Reusable Blocks first, since they are a slightly simpler prospect compared with Template Parts.
To kick things off, here's a video detailing how this pattern could work:
Select.a.reusable.block.mp4
The Reusable Block has a different color treatment to indicate the block type.
On hover there is a green outline.
An overlay also appears subtly obscuring the contents and suggesting the user must take additional action to edit them.
When selected the icon in the Toolbar is also green.
Regardless of where I click on the container block, the parent is always selected.
A single click on a child of the selected container block will select it, and from this moment the parent is "unlocked" so that you can select sibling blocks with a single click as normal.
The "rest" of the canvas is faded out slightly behind an overlay. Clicking that exits the "edit state" of the Reusable Block.
There is a figma prototype here that you can play with yourself to try this out.
Color
Once the user understands the relationship between the color and the block type, the overall UX is improved as upon hover it becomes clear that a simple double-click behaviour can be used to select the child block:
This relationship can of course be extended to template parts, where the same overall pattern can be employed with a different color to indicate the different block type. Likewise other UI elements can also utilise these colors to increase block-type clarity:
Since the purpose of these colors go beyond decoration, they should probably persist between color scheme updates. That way a user will always understand what is a Reusable Block and what is a Template Part even if they change their preferences.
I'm using green for Reusable Blocks in the demonstrations above, but that is not prescriptive. The actual colors we use warrant further investigation, especially if we intend to use them in other applications like List View, the Toolbar, or the Inspector. cc @jasmussen
Less is more
It is worth outlining that this should feel like a very subtle layer of friction, and that:
All editing is still contained within a single editor.
Dragging blocks in and out of a Reusable Block should still work.
Navigating with keyboard should still work.
List views should always show all contents and all areas.
Copy and paste from and into should work.
“Move to” should work.
Wrapping up
I am sure there are many other considerations...
Should this pattern should cascade down the tree when a Template Part contains a Reusable Block?
Should the overlay only appear on selection, or hover and selection?
Are the overlays effective, or overkill? Perhaps outlines alone are adequate...
Should all parent / child blocks behave this way (not just Template Parts and Reusables)? If so, should we add a hotkey that enables selection of the lowest child in the tree with a single click?
To begin with I think it would be interesting to put a try branch together to explore this in the simplest way possible.
Recently there has been some chatter around the impracticality of selecting and working with container blocks and their children.
Even with the additional outline effects we added in the Site Editor, selecting a container block sometimes requires too much cursor precision and feels finicky (technical term :D). In some situations it is outright impossible... in the gif below I fight valiantly to select the Columns block inside the Header Template Part in tt1-blocks, before giving up and having to use the parent selector on one of the single Column blocks:
Click through to edit
In #27852 (comment) I explored a potential solution to this problem for Template Parts that involves the user having to click "through" the container to select the children. Similar to how selecting child blocks in "Select" mode works, or how you might select the contents of a "group" in software like Sketch or Figma.
I'm wondering if we might instead implement a reduced version of the above to Reusable Blocks first, since they are a slightly simpler prospect compared with Template Parts.
To kick things off, here's a video detailing how this pattern could work:
Select.a.reusable.block.mp4
There is a figma prototype here that you can play with yourself to try this out.
Color
Once the user understands the relationship between the color and the block type, the overall UX is improved as upon hover it becomes clear that a simple double-click behaviour can be used to select the child block:
This relationship can of course be extended to template parts, where the same overall pattern can be employed with a different color to indicate the different block type. Likewise other UI elements can also utilise these colors to increase block-type clarity:
Since the purpose of these colors go beyond decoration, they should probably persist between color scheme updates. That way a user will always understand what is a Reusable Block and what is a Template Part even if they change their preferences.
I'm using green for Reusable Blocks in the demonstrations above, but that is not prescriptive. The actual colors we use warrant further investigation, especially if we intend to use them in other applications like List View, the Toolbar, or the Inspector. cc @jasmussen
Less is more
It is worth outlining that this should feel like a very subtle layer of friction, and that:
Wrapping up
I am sure there are many other considerations...
To begin with I think it would be interesting to put a try branch together to explore this in the simplest way possible.
Let's discuss.