Gutenberg: Prioritise exact block name match higher than partial category match

Created on 8 Apr 2019  路  5Comments  路  Source: WordPress/gutenberg

Is your feature request related to a problem? Please describe.

Prioritise exact block results higher in block picker, over partial category results.

For example when there is a category "formatting" and a block name "form", typing "form" in search shows up formatting first and the block (and the plugin's custom category where the block is in) is hidden under the fold:

Screenshot 2019-04-08 at 18 07 18

image

This is just an example with Jetpack, but the problem is pretty generic.

Describe the solution you'd like

Exact block results should show up first.

Describe alternatives you've considered

Category matches would be first, but unless there are blocks inside the category with matching names, the category would be closed.

Category names are such that parts of them can easily be found in blocks from different plugins:

image

[Feature] Inserter [Priority] High [Type] Enhancement

Most helpful comment

Prioritise exact block results higher in block picker, over partial category results.

It occurs to me as well that, if not already whether, as part of this or separately, it should be considered to give priority to a term where the matching segment of the block name or keyword is at the beginning.

e.g. Given a search term "form", prioritizing a "Form" block or a "format" keyword over a "Preformatted" block, since the term occurs at the beginning.

All 5 comments

Prioritise exact block results higher in block picker, over partial category results.

It occurs to me as well that, if not already whether, as part of this or separately, it should be considered to give priority to a term where the matching segment of the block name or keyword is at the beginning.

e.g. Given a search term "form", prioritizing a "Form" block or a "format" keyword over a "Preformatted" block, since the term occurs at the beginning.

To add a further related issue, I'd much prefer if matches to the block name or an exact match keyword were prioritized over other keyword matches.

slash inserter search for "image" returns a number of image-related blocks with the Image block in the middle of the list

It seems that this suggestion and similar also come up in #5643

Aha, I suspect this may be the root issue for what I just reported over here: https://github.com/Automattic/wp-calypso/issues/45098

cc @gziolo as it seems you did some significant and related work in this component last year.

I'd much prefer if matches to the block name or an exact match keyword were prioritized over other keyword matches.

I was going to mention exactly this, @mrwweb. I will usually type out the exact name of the block, press enter, and continue typing and this bug completely breaks my flow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhenrylucero picture mhenrylucero  路  3Comments

youknowriad picture youknowriad  路  3Comments

davidsword picture davidsword  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments

nylen picture nylen  路  3Comments