-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed as duplicate of#33954
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] Block DirectoryRelated to the Block Directory, a repository of block pluginsRelated to the Block Directory, a repository of block plugins[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
- Part of Block API #41236.
Description
If you have any blocks hidden, the block directory won't load any external results. This is caused by the canInsertBlockType
check, which checks against allowedBlockTypes
. When there are hidden blocks, this list is set to the current registered blocks, minus those hidden blocks (source).
Since this is a safelist to match against, rather than a "disallowed" list, anything not on the list is blocked, and since it's created from locally registered blocks, nothing in the Block Directory is allowed.
Related to #33954
Step-by-step reproduction instructions
- Open an editor, go to Preferences > Blocks
- Uncheck some blocks
- Go back to the block inserter, try searching for a block in the directory —
table
,recipe
, etc - No results will load
- Unhide the blocks
- Try the search again, it should work
Screenshots, screen recording, code snippet
Screen.Recording.2022-02-03.at.12.49.18.PM.mov
Environment info
- WP 6.0-alpha
- Gutenberg trunk 7ab78a2
- Theme: emptytheme
- No other plugins
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
Metadata
Metadata
Assignees
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] Block DirectoryRelated to the Block Directory, a repository of block pluginsRelated to the Block Directory, a repository of block plugins[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended