-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
The problem
This continues the discussion about selection and focus started in #22089 (comment)
At the moment clicking on an item in BlockNavigation selects the block in the editor area. This was the original goal of the BlockNavigation and it feels natural in the post editor:
On the menu management screen this behavior does not feel natural to me at all - especially if you primarily use the keyboard. On that screen, the BlockNavigation is no longer supposed to be a shortcut to find the proper block in the editor area. Instead, it's became a kind of an editor itself - it allows you to move the block around, duplicate/delete/copy it, edit the label, and so on. Once the focus is inside of the BlockNavigation, it only makes sense to keep it there. Transferring it to the editor area is confusing and a little bit frustrating:
(which also means we should change the name BlockNavigation or use a different component)
I found it pretty hard to make progress on the ellipsis menu (#22089) without clarity on the details of selection/focus interactions. We know that moving the focus over to the editor area is confusing, but what exactly should happen? This affects many of the explored navigator features such as duplicating/removing/clicking an item, editing the label, or editing the link.
The explorations
I played with selecting the navigator item AND corresponding editor area block on single click, and enabling the edit mode inside of the navigator on double click.
Mouse interactions seemed pretty natural. Keyboard navigation still need a good equivalent of a double click. Perhaps pressing the enter for the first time = selection, pressing enter for the second time = edit mode?
Also, as you can see on the gif above, it's possible to use the keyboard to focus on a non-active/selected item. Here's an experiment where a related editor area block is automatically selected when the focus shifts in the navigator:
And then I thought - maybe we don't need to synchronize the selection with the editor at all if the navigator is supposed to provide most or all of the editor features (editing the label and link, moving the block, duplicating, and so on). Here's how that looks like:
In this scenario, a single enter would enable the edit mode.
cc @karmatosed @tellthemachines @noisysocks @draganescu @talldan




