WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Row Block not spacing inner blocks properly within editor #39090

Closed maddisondesigns closed 3 months ago

maddisondesigns commented 2 years ago

Description

- When you try to remove a Row Block it says "Remove Group". It's completely irrelevant whether you're inserting a Group Block in the actual code. As far as a regular user is concerned the "Row Block" is just another type of block. It's annoying and incredibly confusing when you have options like "Remove Group" on a Block that is called a "Row". You do this on multiple blocks because I've mentioned this problem on multiple issues.

screenshot_171

- The alignment is all messed up in the editor but displays ok on the front-end Editor

screenshot_170

Front-end

screenshot_169

- After you've entered a number in the Padding field, you can't remove it. When you delete the text and move away from the field, the same text reappears.

https://user-images.githubusercontent.com/2078245/155692700-bc2a8d54-eb28-4877-95b2-68d53516ec65.mp4

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

WP 5.9.1 Twenty Twenty One Firefox 97.0.1 macOS 12.2.1 No Gutenberg plugin, core only

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

Mamaduka commented 2 years ago

Thanks for contributing, @maddisondesigns.

The last issue might not be related to the Group/Row block but a general bug with Dimensions control. I can reproduce the same bug on the Code block.

cc @aaronrobertshaw, @ciampo

ciampo commented 2 years ago

I'm probably not the better-suited person to have a look at this, and I think that Aaron is not going to be around next week. Cc'ing @andrewserong @ramonjd @glendaviesnz

maddisondesigns commented 2 years ago

Another issue to add to the list:

When you turn off Allow to wrap to multiple lines, blocks start overlapping each other.

screenshot_172
andrewserong commented 2 years ago

Thanks for the ping @ciampo (and for reporting the usability issues @maddisondesigns!)

  • After you've entered a number in the Padding field, you can't remove it. When you delete the text and move away from the field, the same text reappears.

For this one, you can currently commit the change by pressing ENTER before tabbing or clicking out of the field, but I agree, the behaviour here doesn't feel intuitive to me, either. I've opened up a PR (#39109) to look at the behaviour of clearing out an InputControl field that has isPressEnterToChange, which should then resolve the issue with the padding and margin controls 🀞.

ramonjd commented 2 years ago

It's annoying and incredibly confusing when you have options like "Remove Group" on a Block that is called a "Row". You do this on multiple blocks because I've mentioned this problem on multiple issues.

I've taken a stab at displaying the block display title in the remove "Remove x block" label over at https://github.com/WordPress/gutenberg/pull/39110

A "block display title" might be a specific block variation title, or a reusable block group name.

Screen Shot 2022-02-28 at 1 13 04 pm
skorasaurus commented 2 years ago

Thanks for reporting all of these issues; a couple of have been reportedly been fixed since issue was made, the two issues that you've said are:

I'm not able to reproduce either of these in WordPress 6.0 and Gutenberg 13.5 activated; it appears like the following which isn't aesthetically pleasing but the image is resized smaller to prevent overlap. image

Could you share if you're still experiencing this currently and give more detail about the alignment issue?

The block markup that I'm using is https://gist.github.com/skorasaurus/bd4f2caa9b18ffad7d232db183ccc2b2

maddisondesigns commented 2 years ago

@skorasaurus I've just checked these issues...

screenshot_949

I tested this with WP6.0 and Gutenberg 13.5.1

skorasaurus commented 2 years ago

Thanks for the update: Took me a second to figure out that you applied wide width to the block; I'm able to reproduce this as well; the issue being that in the editor; the row block does not properly space out inner blocks under certain conditions, which I specify below. The inner blocks are spaced out properly on the front-end.

So, to reproduce:

  1. install a theme.json-less theme like twentytwentyone
  2. create row block, apply wide or full width to it; and set justification to equal spacing
  3. create 3 blocks (paragraph or headers) inside row block

@maddisondesigns if you could update the issue's title so others could find it easier, that'd be great.

(EDIT: Corrected my notes as mentioned by @maddisondesigns )

maddisondesigns commented 2 years ago

@skorasaurus I think you have that around the wrong way. The issue is that the row block doesn't properly space out inner blocks in the Editor (this does happen on the front-end). i.e. it displays properly on the front-end but not in the editor.

I've also updated this issues title for better clarity.

Mamaduka commented 3 months ago

It looks like this lists a couple of issues, and I believe most were fixed.

@maddisondesigns, can you update the issue description and only leave the remaining one(s)?

maddisondesigns commented 3 months ago

@Mamaduka I think this one can probably be closed now. All the issues that I mentioned seemed to have been fixed, or at the very least, Gutenberg has changed enough so that they no longer apply.

Mamaduka commented 3 months ago

Thanks for the update, @maddisondesigns!