gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Buttons Block: Unclear that you can't move a single button outside the 'Buttons' parent block

Open yvettesonneveld opened this issue 6 years ago • 8 comments

Describe the bug I can't move a button block into a column

To reproduce

  1. I created a set with three columns, headers, paragraph text in each column.
  2. I created a button (and noticed that, by accident, you haven't created the button in the columns)
  3. I tried moving the button into the column, in several ways
  4. I could not make it work

Expected behavior I would have a expected to be able to move the button into the column.

Screenshots See the screen recording I created and uploaded to youTube: https://youtu.be/kXY1czU7O6E

Editor version (please complete the following information):

  • WordPress version: 5.6 Beta 1
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Just the default
  • If the Gutenberg plugin is installed, which version is it? not applicable

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 86.0.4240.75

yvettesonneveld avatar Oct 22 '20 10:10 yvettesonneveld

Hey @yvettesonneveld - thanks for reporting this.

This is a bit technical but you can actually create a Buttons block which is a wrapper for single Button blocks. The Button block can live only inside its Buttons wrapper, so that's why you can't move a single one in a different block (Columns in your case).

You can move the whole Buttons wrapper inside Columns, by selecting the parent of that Button first.

Hope that helps.

ntsekouras avatar Oct 22 '20 15:10 ntsekouras

Thanks for your explanation, @ntsekouras. I did not know, so thanks for your explanation. I was able to move them now.

yvettesonneveld avatar Oct 22 '20 16:10 yvettesonneveld

I do believe this is a new bug with 5.6 beta.

I am unable to move the buttons, even if I select the drag handle. If this is intentional, I think it needs to be reverted, because users will not be able to tell that the drag handles do two different things, depending on if the user accidentally selected the button not the (invisible until you manage to click the right thing) buttons block.

buttons56

In the gif I am using 5.6-beta1-49280, Gutenberg is not active.

I wonder if this is related to the change to the edit link field, as you can see, it remains open and "flowing", scrolling with the page while I select and drag.

carolinan avatar Oct 23 '20 05:10 carolinan

@carolinan You're right, button is only allowed to be nested in a buttons block, so when you try dragging the inner button in the gif it fails to be moved somewhere outside of buttons.

But that's the technical explanation, and I think you're right that it is a confusing experience. Maybe button could be allowed outside of buttons, but hidden in the inserter menu to guide users towards using a buttons (i.e. unticked in the block manager)?

I'll add the Needs design feedback label.

talldan avatar Nov 24 '20 04:11 talldan

Our team and our clients have also found the relationship between the buttons block and the button block confusing. We've had situations where individuals try to drag a button, delete a button or align a button, only to have it fail because those actions need to be done on the parent buttons block.

When it comes to dragging, there seem to be two problems. First, the drag handle appears even if there is only one button. Using the drag handle has no effect given that the button can't be moved anywhere. Second, if you use the drag handle on the button block, blue lines still show up throughout the UI signaling that the button can be moved almost anywhere. Once the mouse is released, nothing happens, which causes a pretty odd user experience.

Finally, I wanted to mention that we're seeing this behavior in WordPress core version 5.5.3.

Thanks to all on this issue for the helpful descriptions and notes.

jg314 avatar Nov 24 '20 23:11 jg314

It seems to me that the solution here is to make it so that when you drag a lone Button block somewhere, it automatically creates a Buttons block at the desired location.

Additionally, I think it would make sense to automatically remove any empty Buttons blocks.

ZebulanStanphill avatar May 07 '21 16:05 ZebulanStanphill

Is there a technical reason why this is not allowed? Seems like moving a button into a columns should not need a buttons parent block.

ecotechie avatar Sep 06 '22 23:09 ecotechie

If buttons can only live inside buttons, dragging a single button outside its buttons container should automatically create a second buttons container with that single button in the destination. This will explain the behavior by itself and reduce confusion.

guidofd avatar Jul 10 '25 10:07 guidofd