-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Autocompleters: Consider block category #12287
Autocompleters: Consider block category #12287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I tested the default configuration and I used filters to register custom categories and in both cases, the tests went well.
…rnmobile/danilo-try-to-fix-undo-redo * 'master' of https://github.com/WordPress/gutenberg: Autocompleters: Consider block category (#12287) Only init TinyMCE once per instance (#12386) RichText: convert HTML formatting whitespace to spaces (#12166) Notices: Remove "files" block in package.json (#12438) Edit Post: Avoid rendering AdminNotices compatibility component (#12444) Correct the docs manifest (#12411)
…HEAD * 'master' of https://github.com/WordPress/gutenberg: [RNmobile] Fix problems with undo/redo on Android (#12417) Add registry param to withDispatch component (#11851) Autocompleters: Consider block category (#12287) Only init TinyMCE once per instance (#12386) RichText: convert HTML formatting whitespace to spaces (#12166) Notices: Remove "files" block in package.json (#12438) Edit Post: Avoid rendering AdminNotices compatibility component (#12444) Correct the docs manifest (#12411)
Once concern here is that it is not clear at all what the search is matching for to the user, specially for partial matches. There's already an issue for this regarding aliases of blocks. |
Yes, this is tricky, and we've already had some challenges around this with a search for "Image" that also matches a gallery. And because we sort by frequently used, the 2nd time you search for /image and press enter if you just inserted a gallery, you'll get an image. I think we should start work on #5643 before we expand this search further. Ideally when you type /image and press Enter, you should always get an image. Once we have that in place, we have a good baseline. In the case of this PR, I get the purpose behind it, but the challenge is the same. I can easily imagine a block existing called "Layout", which would confuse this search even further. |
Description
In #9999 we updated the inserter to respect the block categories when searching. This PR applies the update to the block autocompleters, which allows us to use the slash inserter with a block category, revealing all the blocks from that category.
How has this been tested?
/CATEGORY
whereCATEGORY
is one of the block categories (common
,formatting
, 'layout,
widgets`, etc.)Screenshots
Types of changes
Checklist: