Skip to content

Exclude private blocks from the autocompleter#6793

Merged
gziolo merged 1 commit intomasterfrom
fix/shared-block-showing-in-autocompleter
May 17, 2018
Merged

Exclude private blocks from the autocompleter#6793
gziolo merged 1 commit intomasterfrom
fix/shared-block-showing-in-autocompleter

Conversation

@noisysocks
Copy link
Member

@noisysocks noisysocks commented May 17, 2018

Prevent blocks that do not have supports.inserter set from displaying in the blocks autocompleter.

Fixes the bug that @gziolo noticed in #6766 (comment):

screen shot 2018-05-16 at 09 41 45

To test:

  1. Type / to bring up the autocompleter
  2. Search for 'block'
  3. Shared Block should not appear

Prevent blocks that do not have supports.inserter set from displaying in
the blocks autocompleter.
@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels May 17, 2018
( { category } ) => 'common' !== category
)
);
return Promise.resolve( flow( filterBlockTypes, sortBlockTypes )( getBlockTypes() ) );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a somewhat temporary fix because @brandonpayton is working on using getInserterItems here which would also fix this bug as well as a lot of similar bugs.

@gziolo gziolo added this to the 2.9 milestone May 17, 2018
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for fixing it 💯

@gziolo gziolo merged commit 2f98697 into master May 17, 2018
@gziolo gziolo deleted the fix/shared-block-showing-in-autocompleter branch May 17, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants