WordPress / gutenberg

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

Site Editor: block toolbar covers blocks that are close to top of header template #31008

Closed Sandstromer closed 3 years ago

Sandstromer commented 3 years ago

Description

In the site editor, when editing the header, any blocks that are close to the top of the template are obscured by the toolbar. This is very apparent when removing the spacer block in the header of TT1-Blocks theme. When the toolbar obscures the block it is almost impossible to edit that particular block. Not all themes will contain a 70px spacer as the first block in the header, so making editing such things as site-title/tagline/navigation almost impossible.

Step-by-step reproduction instructions

  1. With TT1-Blocks theme, go to Site Editor
  2. Select the header template part
  3. Remove the 70px spacer block at the top of the header
  4. Notice how you cannot edit the blocks that are now appearing at the top of the header, because they become obscured by the toolbar when selecting the block

Expected behaviour

All blocks should be editable and not obscured.

Actual behaviour

Blocks close to the top of the header are obscured and uneditable.

Screenshots or screen recording (optional)

gutenberg-header-editing-01 gutenberg-header-editing-02 gutenberg-header-editing-03

Code snippet (optional)

WordPress information

Device information

skorasaurus commented 3 years ago

similar problem at https://github.com/WordPress/gutenberg/issues/26239

ellatrix commented 3 years ago

I wonder if some gray padding like the template editor would be beneficial here. It would also ensure there's always some clickable area to clear selection. Cc @jasmussen

jasmussen commented 3 years ago

Is this a duplicate of https://github.com/WordPress/gutenberg/issues/29464? In that I also suggest that instead of adding padding, we can move the toolbar below the block. That lets us reserve the padding for indicating template editing, and it also takes up less space.

ellatrix commented 3 years ago

Yes, this is a duplicate of #31008.