Skip to content
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

Widget Editor: Which area is the block being added to? #25379

Closed
mapk opened this issue Sep 16, 2020 · 9 comments
Closed

Widget Editor: Which area is the block being added to? #25379

mapk opened this issue Sep 16, 2020 · 9 comments
Assignees
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php.

Comments

@mapk
Copy link
Contributor

mapk commented Sep 16, 2020

Problem

When adding a block from the Inserter, there is no clear indicator showing which widget area the block will be added to.

Example from Post Editor
In the Post Editor, when using the keyboard to add a block from the Inserter to the document, if nothing is selected, the block gets added to the bottom. If a block is selected, a visual indicator (ie. blue line) appears showing where the block would be added.

indicator

Explorations and discussions
Initially, this exploration was discussed (#25176 (comment)), but was found (#25176 (comment)) that using the keyboard, there would be two things focused on screen which leads to a problem. So how do we highlight or indicate which widget area a focused block would be added to from the Inserter?

adding

cc @adamziel

@mapk mapk added the [Feature] Widgets Screen The block-based screen that replaced widgets.php. label Sep 16, 2020
@mapk mapk self-assigned this Sep 16, 2020
@mapk
Copy link
Contributor Author

mapk commented Sep 16, 2020

I fiddled around with a solution that involves a modal when nothing is selected. This particular prototype shows a flow using the keyboard only, but it would apply when using the mouse if no area is previously selected as well.

The nice thing about using a modal like this is that it echoes the current accessibility mode in the widget screen.

keyboard

@carolinan
Copy link
Contributor

carolinan commented Sep 17, 2020

Or disable the sidebar inserter and only allow adding blocks from the add block inserter activated from inside the specific widget area.

@draganescu draganescu changed the title Widget Editor: Which are is the block being added to? Widget Editor: Which area is the block being added to? Sep 17, 2020
@mapk
Copy link
Contributor Author

mapk commented Sep 18, 2020

Or disable the sidebar inserter and only allow adding blocks from the add block inserter activated from inside the specific widget area.

@carolinan, I was thinking through that idea as well. 👍 However, it tends to break away from the current classic Widget screen pattern of showing all widgets in one area. It also veers from the existing block editor pattern too, so I chose not to pursue that direction.

I mocked it up real quick for a visual.

Inline inserter 2

  • Would the Inline Inserter popover be scrollable?

@mapk
Copy link
Contributor Author

mapk commented Sep 18, 2020

Using the keyboard to add a block when there are no areas selected

Another iteration is on a keyboard flow that defaults adding a block to the first area when nothing is selected. This block could then be cut and pasted into another area as in the prototype below.

  • In the prototype, notice that there are no widget areas selected. So when adding a block from the Inserter panel, The "drop" indicator (blue line) defaults in the first widget area.
  • The block is then added and filled out.
  • Then I click CMD + X to cut the block (just like in the block editor today).
  • The widget area is now highlighted and selected.
  • I TAB down to the next widget area.
  • Then CMD + V to paste the block into that area.

keyboard-copypaste

@paaljoachim
Copy link
Contributor

paaljoachim commented Sep 21, 2020

Very nice explorations, Mark!

Actually this issue Drag and drop from inserter to post #1511 is more important now in relation to the widget screen than earlier. In relation to drag & drop of blocks from the Inserter Panel to the Widget areas (and Gutenberg block areas.)

I still think that when no widget area is selected that when opening the Inserter Panel that the first widget area should automatically become highlighted (as you show above in your mockup). It also gives the needed visual hint to the user which widget area is by default selected, reminding the user to click another widget area if need be to add the block/widget there.

@mapk
Copy link
Contributor Author

mapk commented Sep 21, 2020

Actually this issue Drag and drop from inserter to post #1511 is more important now in relation to the widget screen than earlier.

I agree, but we'll still need to figure this out in relation to keyboard controls only.

I still think that when no widget area is selected that when opening the Inserter Panel that the first widget area should automatically become highlighted (as you show above in your mockup).

Even in light of this comment: #25176 (comment) which notes that two elements would be focused then? I imagine having two elements focused at the same time could cause some problems.

@draganescu
Copy link
Contributor

@mapk there still is a problem with the situation when all the widget areas are minimized.

@mapk
Copy link
Contributor Author

mapk commented Sep 24, 2020

@draganescu, How's this? Basically, if everything is collapsed, as soon as the Inserter panel opens, the first area expands as well.

collapsed

@mapk
Copy link
Contributor Author

mapk commented Oct 7, 2020

Looks like this one has been resolved? I'm closing now.

@mapk mapk closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php.
Projects
None yet
Development

No branches or pull requests

4 participants