Gutenberg: Block icons are reordered when adding new blocks

Created on 18 May 2020  Â·  4Comments  Â·  Source: WordPress/gutenberg

Describe the bug
When selecting blocks from the block selector, the order of blocks changes unexpectedly.

jumping blocks

To reproduce
Steps to reproduce the behavior:

  1. Open the gutenberg editor
  2. Click on the New Block (+) icon
  3. Scroll down to the Layout Grid block ( I tested with other blocks too )
  4. Click on the block to add it to the page

Expected behavior
The block icon in the block selector panel stays in the same place

Actual behavior
The Block icon changes positions! moving further up the list of blocks

Screenshots

Editor version (please complete the following information):

  • Tested with gutenberg v8.1.0 which is currently deployed to wordpress.com edge sites and also v8.0.0

**Desktop

  • OS: macos
  • Browser Chrome

I'm sorry if this is an existing issue already

Needs Design Feedback [Feature] Inserter [Type] Bug

Most helpful comment

Certainly very interesting note!

“Most Used” or "Common Blocks" are a bit obscure and lack contextuality of the content or intent, more so with FSE.

It’d be ok to keep it as a functionality people opt-in, but hide it as a default. Which would solve this particular issue.

If users want to activate those views, blocks directory shall not update in the same inserter session. If the inserter closes or the editing session closes, the blocks can be arranged to reflect the usage.

All 4 comments

Certainly very interesting note!

“Most Used” or "Common Blocks" are a bit obscure and lack contextuality of the content or intent, more so with FSE.

It’d be ok to keep it as a functionality people opt-in, but hide it as a default. Which would solve this particular issue.

If users want to activate those views, blocks directory shall not update in the same inserter session. If the inserter closes or the editing session closes, the blocks can be arranged to reflect the usage.

Hey thanks for looking into it! yea it's surprising behavior to me, also, this behavior doesn't only affect the "most used" and "common blocks" it affects other block categories too!

Collage block changes from 2nd to 1st place in its category:
Jun-01-2020 14-04-21

I confirmed this happens with blocks in all categories and agree they should not be moving around on insert.

@pablohoneyhoney I agree that the inserter should not update in real-time. If we do the opt-in functionality, do you know of a similar behavior where I can look up how it is implemented?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moorscode picture moorscode  Â·  3Comments

pfefferle picture pfefferle  Â·  3Comments

mhenrylucero picture mhenrylucero  Â·  3Comments

maddisondesigns picture maddisondesigns  Â·  3Comments

hedgefield picture hedgefield  Â·  3Comments