-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reusable blocks and Template parts – try a click-through-to-edit-children UX pattern #29337
Comments
Great exploration. I think we should try the full overlay on hover / focus. What I think is excessive is the fading the rest of the canvas once you click through. I'd rather use the proper isolated-mode for that behaviour (an editor that only has the reusable block / template part). |
Makes sense. I updated the prototype to remove the canvas overlay on the click-through state. |
A click through in relation to a reusable block is a good way to go. In relation to a reusable block. One adds an instance to a page and upon clicking one of the inner blocks is selected. A reusable block needs to be harder to edit. So for a reusable block upon clicking/selecting the first click should be the parent. Then one further clicks to go into to edit one of the inner blocks. Side track-- Clicking a block is a pretty regular thing. But for a reusable block we should instead have the click once to select and then click again to select one of the inner blocks. --> Let's keep it subtile as in no overlay and no change of color. Keep things as every day as possible. One is just clicking a block but this kind of block does it just a little differently. It would be nice for the first iteration to just include the click-through-to-edit-children UX pattern with no color changes. |
@paaljoachim without the color change (or the overlay) there is nothing to visually signify that the reusable block is different to any other. If it looks the same but behaves differently couldn't that be very confusing? |
It should be easy to try with and without the overlay to see what feels best 🙂 |
I think a more dramatic change would help understandability. A subtle change in color doesn't feel enough - and we have to think of users with low color range. |
I think that's something we can also try quickly once we have a PR up and running 👍 |
Picking up where @jameskoster left off, I made some small additions to this flow. This version includes the ability to edit the Reusable block in an isolated editing view, which mirrors Template Part editing:
This version also reflects recent changes to show inner child blocks toolbars with a parent selector. overlay.movHere’s an updated Figma prototype which includes the isolated view. |
Yay! I think the trickiest thing to get right here is the positioning of the reusable block in isolated editing view. I understand why you've "locked" it in position, but I wonder how that will behave in practical terms. What if the reusable block is only half in view when I enter isolated editing? Does the window "snap" in to position? 🤔 Likewise if the reusable block occupies more vertical space than is available on the canvas, how does scrolling work then? What about a combination of those two things? 😅 FWIW I don't think it would be the end of the world if we were to simply position it right in the middle of the canvas. |
Thanks for raising these points @jameskoster! This made me realize a couple of things about the isolated view, re: both the position and width of the Reusable block being edited. Position:
Centering the isolated block makes a lot of sense for these reasons. Here's an updated Figma prototype with a long RB that goes past the fold on the page. In this version, you can scroll within the isolated view to see the full length of the block. isolated.movWidth: Also realized that the narrow width of the Reusable block in this particular layout would most likely come from the Reusable block being placed within a Column block, so I've made the inner contents of the Reusable block 100% of the main column width within the isolated view. Wanted to make sure this kind of transition wasn't jarring/confusing but feels ok to me! |
Sorry, I'm having difficulty to keep up with these. I have these notes here for a while. I think it's best if I post them now and you filter what is useful or not. Maybe it's more efficient then me trying to analyze all the thread and miss some important point.
Hover is always nice to have but it has to be super subtle. I think a outline is less tiring and more precise then a overlay.
Selecting children is one of the most frustrating experiences there can be. Clicking trough all the tree is not good at all. We should always look at things with extreme exemples. What if there are 10 children? More? |
Hopefully the persistent list view will help with selecting further down the tree. If not, I personally find the command modifier in Figma works very well: modifier.mp4 |
Testing this idea out on a PR - #30156 |
As this continues to be explored, I wanted to bring in some feedback from the third call for testing for the FSE Outreach Program:
While making these patterns to edit similar between the two makes sense, it might also inadvertently increase confusion around when to use each (template parts carry semantic meaning vs reusable blocks which should exist alongside regular blocks). Something to keep in mind as things move forward! |
Closing as fixed by #31109 ✨ |
Did this implementation change at all since this was merged? Asking as this feedback came in as part of the twelfth call for testing for the FSE Outreach Program:
Here's a video of the current experience with WordPress 5.9.1 and Gutenberg 12.7.1. I expect that I would need to click through to edit the Header and that, at first, it would select the overall Header template part rather than the inner blocks within: template.part.ux.movHappy to open an issue but wanted to see if the folks part of the initial implementation knew if anything had intentionally changed before I did so |
Apologies -- I just found this issue that covers this exact use case 🤦🏼 #35079 Connecting these so no one else makes the same mistake (I couldn't find it despite everything I was searching). |
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.
The text was updated successfully, but these errors were encountered: