Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude private blocks from the autocompleter #6793

Merged
merged 1 commit into from
May 17, 2018

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