WordPress / gutenberg

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

Empty block inserter and search results when editing page content from site editor if Content Block is selected in List View #55151

Open miksansegundo opened 1 year ago

miksansegundo commented 1 year ago

Description

The block inserter is empty and searches return no results when editing page content in the site editor if the Content Block is selected in the List View.

I would expect to see the block inserter as expected with tabs with blocks, patterns, and media so I can add blocks to the page content.

Step-by-step reproduction instructions

  1. Create a template with the Content block included from the site editor
  2. Associate that template to a page from the page editor
  3. Go to Site editor to edit that page
  4. Select the Content Block in the List View
  5. Open the block inserter [ + ] from the header and verify is empty and searches return no results

Screenshots, screen recording, code snippet

Screenshot 2566-10-09 at 11 54 54

https://github.com/WordPress/gutenberg/assets/1881481/d37ac02d-6cf6-4fae-9089-26be93ee7708

Environment info

Gutenberg 16.6.0

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

talldan commented 1 year ago

The inserter typically inserts after the selected block. For example the same happens when a group is selected, so that's one reason this is happening.

The second issue here is that unless you're in template editing mode, no blocks can be inserted in the template for the page (after the 'Content' block), so that's why no inserter blocks show up.

It is working as designed, though I agree it can be a little confusing.

I'll add a 'Needs design feedback label' to the issue, as I think this could do with some thought about the user experience. Two things spring to mind for me—maybe it could be smarter and know to insert inside 'Content' when there's no alternative (though this may also be confusing), or perhaps alternatively there could be more information about why nothing is showing in the inserter menu.