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

Blocks can be inserted to the right of full width blocks, which breaks the page #61502

Open
binaryfire opened this issue May 8, 2024 · 4 comments
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Type] Bug An existing feature does not function as intended

Comments

@binaryfire
Copy link

Description

When a block is set to full width, the blue vertical inserter bar still appears when you drag another block to the right edge of the full width block. Dropping it there inserts it, and causes the page to become extremely wide and break things

Step-by-step reproduction instructions

  1. Drag a block into the page
  2. Set it to full width
  3. Drag another block to the very right edge of the full width block until the blue drop indicator appears
  4. Drop the block

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@binaryfire binaryfire added the [Type] Bug An existing feature does not function as intended label May 8, 2024
@andrewserong andrewserong added the [Feature] Drag and Drop Drag and drop functionality when working with blocks label May 8, 2024
@richtabor
Copy link
Member

@binaryfire Do you mind sharing a screen recording of this happening?

I'm pretty sure it creates a Row block when you place something to the right of another block.

@binaryfire
Copy link
Author

binaryfire commented May 9, 2024

Hi @richtabor. Sure thing, will do that shortly.

Just as some context in the mean time, what I’m trying to do is deliver a client site with only full width ACF blocks (basically a nicer alternative to flexible content).

The problem is that even when the block is set to full width, another block can be inserted to the right. Which doesn’t make sense to me since full width should mean 100% page width, thereby preventing anything else from being inserted on the left/right.

The odd thing it’s not possible to insert anything on the left. Just the right. And that’s when things break

@binaryfire
Copy link
Author

binaryfire commented May 10, 2024

@richtabor Here's a vid. Simple ACF slider block set to full width, followed by inserting another block to the right of it: https://zapzap.dubb.com/v/E0sWGu

Is there any way I can prevent this? Perhaps some workaround or hack to disable all vertical insertion points / dropzones and just leave the horizontal ones?

Shipping sites to clients with only a curated set of full-width blocks (sections) is a fairly common use case in certain cases. It would be good to have a way of preventing clients from breaking things in unexpected ways like in this video.

@stokesman
Copy link
Contributor

I wonder if you have tested what happens when you put a single Image Slider block in a row. It’d be good to know if that block has an issue with being placed in certain containers. I've not come across other blocks that malfunction when the editor inserts a row around one or more of them.

I can see how this row-creating behavior could be unexpected for a full width block. I don’t know that I take issue with it other than it seems the newly created Row block ought to take on the alignment setting of the existing block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants