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

Block reordering controls missing when using the top toolbar #21407

Closed
johnbillion opened this issue Apr 5, 2020 · 21 comments
Closed

Block reordering controls missing when using the top toolbar #21407

johnbillion opened this issue Apr 5, 2020 · 21 comments
Labels
[Feature] UI Components Impacts or related to the UI component system [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@johnbillion
Copy link
Member

Describe the bug

When the top toolbar is in use, the controls for reordering blocks are missing. There doesn't appear to be another way to reorder blocks without these controls.

To reproduce
Steps to reproduce the behavior:

  1. From the More tools & options menu, enable the Top toolbar
  2. Place your cursor within a block
  3. Observe that the controls on the left hand side for reordering blocks are missing

Expected behavior
The reordering controls should be available regardless of the chosen toolbar position.

Screenshots

With the regular toolbar in use:

With the top toolbar in use:

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Tested in Brave, Chrome, and Firefox
@johnbillion johnbillion added [Feature] UI Components Impacts or related to the UI component system [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Bug An existing feature does not function as intended labels Apr 5, 2020
@timhibberd
Copy link

I have same error on Windows / Firefox / Twenty-Twenty Theme ? WP5.4

@johnbillion
Copy link
Member Author

In addition, this prevents users from dragging blocks into child columns or groups.

@afercia
Copy link
Contributor

afercia commented Jul 15, 2020

Looking at previous WordPress versions, looks like this comes from a series of changes.

With the "Top toolbar" option enabled:

WordPress 5.3:

5 3

  • the reordering controls were still displayed on the left of the block
  • the "grab area" was still available (the small area between the buttons)

WordPress 5.4:

5 4

  • the reordering buttons are moved to the top toolbar
  • the "grab area" is gone: I couldn't find a way to drag and drop a block

WordPress 5.5 Beta 2:

5 5

  • the reordering buttons are in the top toolbar
  • they're now stacked vertically thus the clickable area is way smaller compared to 5.4
  • there's no way to drag and drop a block
  • also: the blue outline around the block appears only when hovering or focusing the "change block type" button or the reordering buttons... in all the other cases there's nothing to highlight the block being edited, which makes things even more unclear (see Accessibility regression: The selected block isn't outlined any longer #23892 )

@folletto
Copy link
Contributor

Just to be clear, is this a report that the top toolbar doesn't provide the buttons?
If so, they should be appearing at the top, yes.

However, I tested in the current released 8.5.1 and it's showing correctly:

Screenshot 2020-07-15 at 16 26 13

Is it a regression on the GitHub main branch?

For context: the Top Toolbar option is designed to provide a clean view on text. It's meant to be an approach primarily for text-heavy articles and for writers that prefer the text to be more prominent (i.e. more of a classic editor style). That's why the block is not emphasized and the toolbar is moved away.

@johnbillion
Copy link
Member Author

This was reported against WordPress 5.3. As Andrea mentions it looks like the behaviour has changed in the interim.

@folletto
Copy link
Contributor

Ok, so I think we can close this then? Just to be sure :)

@afercia
Copy link
Contributor

afercia commented Jul 15, 2020

Can't be closed. There's no way to drag and drop blocks to reorder them when "Top toolbar" is on.

@folletto
Copy link
Contributor

folletto commented Jul 15, 2020

As said above, Top Toolbar is meant to be a clean view on text for people that prefer working directly with text.

The functionality to rearrange blocks is still available via arrows, and the dragging functionality is still available by disabling this option. There's no need for an identical behaviour, as this is not the intent behind this option.

@afercia
Copy link
Contributor

afercia commented Jul 15, 2020

I disagree. It's just a removed functionality. Users do expect to be able to drag boxes and the confusion for users is pretty evident if even very experienced core committers don't understand why dragging it's not there.

@johnbillion
Copy link
Member Author

I'm inclined to disagree too. I don't see a correlation between the toolbar position and the availability of the drag and drop reordering controls.

I really like using the top toolbar because I find it stays out of the way when I'm heavily editing content, and part of that heavy editing process is reordering blocks. Dragging and dropping to reorder blocks is really useful and I miss it with the top toolbar in use.

@folletto
Copy link
Contributor

folletto commented Jul 15, 2020

Yeah, the naming isn't great, I agree. I wasn't too keen to call it "Top Toolbar" exactly because it was designed to do more than that (Focus Mode). In practice it's a "writer mode". But it was the most important change, and the other changes kinda followed that change, so I guess it was ok as a naming?

To be clear, in general I'm not against the idea. I totally get your use case. As long as we can find a solution that doesn't hurt the goal why that feature was built in the first place — which is to have a clean writing flow without clutter for users that work better in that way — we can include it back.

I frankly just don't have many ideas that would allow drag without re-adding clutter.
Do you have idea?

@paaljoachim
Copy link
Contributor

The problem.
When the Top Toolbar is activated in WP 5.4 and in WP 5.5 it is not possible to drag a block in and out of a container kind (Group, Columns etc) of Block.

Old solution. Not current any longer.
As Andrea mentioned above #21407 (comment) in 5.3 we had this:
Screen Shot 2020-08-03 at 11 15 25

The above older earlier version solution makes it possible to have the Top Toolbar activated and drag/move any block up or down the page. One can also drag the block out or into a container kind of Block.

Existing.
Example of having two Paragraph Blocks inside a Group Block.
Screen Shot 2020-08-03 at 11 33 59

Brainstorming....

Moving the two Paragraph Blocks out of the Group Block.

Example 1.
Drag icon beside the selected Block.
Drag-icon-beside-selected-block-Top-Toolbar-active

Advantage: Drag is associated with the block. Moving the cursor over the icon it turns into a hand. User can drag the block out of the Group Block.

Disadvantage: The drag icon is not a part of the layout.

--

Example 2.
Screen Shot 2020-08-03 at 12 23 29

I click Paragraph group block 2 and click the Top Toolbar down arrow to move it out of the Group Block. That means clicking the up and down arrows will move a block independent if it is inside a container or not.

Before:
Group Block
-- Paragraph group block 1
-- Paragraph group block 2

Today clicking block 2 it can not be moved further down the page as it is "stuck" inside the parent Group Block.
Suggested change to where it is possible to move a block into and out of a container kind of block. By not greying out the block 2 down arrow, but keeping the down arrow active so the user can move the block out of the Group Block. Like so:

Group Block
-- Paragraph group block 1
-- Paragraph group block 2 ---> Clicks the down arrow to move it out of the Group Block.

Result:
Group Block
-- Paragraph group block 1
Paragraph group block 2. ----> Block is moved outside of the Group Block.

@paaljoachim
Copy link
Contributor

paaljoachim commented Aug 3, 2020

Actually I think the best solution presented would be to use the Select Mode to drag & drop the selected block.
#24092

@folletto
Copy link
Contributor

folletto commented Aug 3, 2020

That's a strong option, I agree.

I also think that your option 2 is quite good — unless it conflicts with something I'm not aware of at least — as it would work everywhere, not just for the focused "Top Toolbar" mode. Feels beneficial overall.

@tomwalkr
Copy link

tomwalkr commented Aug 3, 2020

Just to chime in here – slightly repeating from closed dupe #20840 – this behaviour is very confusing for exactly the audience you're going for, ie writers who don't want to be distracted by the software. 'Top Toolbar' sounds like a desirable option, only for them to find (possibly an hour or so later, once they've forgotten about having changed that setting) that they can no longer drag the blocks, particularly into/out of other blocks – currently impossible.

I (web designer) ended up on this issue because I was asked why their page was "broken" when the drag handles disappeared. This is an extremely surprising behaviour to stem from something that sounds like it simply moves the toolbar to the top of the editor, and indeed they did not remember that was the reason why it had happened.

@folletto
Copy link
Contributor

folletto commented Aug 3, 2020

I think you are also highlighting another point that I didn't notice in the earlier conversations: "Top Toolbar" as a name might be creating more confusion than not. It was originally split out from a single "Focus mode", trying to be more descriptive but... Maybe we should also consider renaming it for clarity?

@tomwalkr
Copy link

tomwalkr commented Aug 3, 2020

Yes, I know I've slightly come from nowhere here (because it was from a search trying to figure out a user's problem for them!) but I think there are two possible solutions to the problem as I understand it:

  1. Top Toolbar should not hide drag handles (it should just, you know, put the toolbar at the top)
  2. Top Toolbar should be called something else that makes it more obvious it will hide UI elements.

@folletto
Copy link
Contributor

folletto commented Aug 3, 2020

I think that adding the drag handles should be our last resort, as it would break the focus experience of the mode. We can start by exploring the options outlined above by Paal — also because I feel they should be beneficial to Gutenberg regardless. And that could go hand-in-hand with a new label for the feature.

And if that doesn't work... and we're out of ideas... we can review the handles too. ;)

@tomwalkr
Copy link

tomwalkr commented Aug 3, 2020

Of Paal's two options, the first (shows a minimal handle) would be preferable from where I'm sitting.

Whichever way you slice it – maybe this is less obvious if you've been part of the development of these features – "I want a focus/distraction-free mode" feels quite unrelated to "I want my toolbar to be at the top". The more things Top Toolbar mode changes relative to any other mode, the more unexpected it is.

@folletto
Copy link
Contributor

folletto commented Aug 3, 2020

Yes, hence I agree it also needs a name change — a new label for the feature — or something along the lines. "Top Toolbar" was originally a Focus mode, that's the problem it was designed to solve. :)

@karmatosed karmatosed removed the Needs Design Needs design efforts. label Nov 9, 2020
@talldan
Copy link
Contributor

talldan commented Jul 21, 2021

Drag and drop is now possible in select mode, so that's one of the options implemented. List view also has drag and drop in 11.1, so that's a second way to reorder things without turning off 'Top toolbar'.

I'm going to close this. If we still feel the options are lacking it's fine to open a new issue or reopen this, but it probably needs more design exploration before a developer can pick it up.

@talldan talldan closed this as completed Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

8 participants