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

Prioritise exact block name match higher than partial category match #14868

Closed
simison opened this issue Apr 8, 2019 · 5 comments · Fixed by #25105
Closed

Prioritise exact block name match higher than partial category match #14868

simison opened this issue Apr 8, 2019 · 5 comments · Fixed by #25105
Assignees
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Priority] High Used to indicate top priority items that need quick attention [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@simison
Copy link
Member

simison commented Apr 8, 2019

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

@aduth aduth added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Enhancement A suggestion for improvement. labels Apr 8, 2019
@aduth
Copy link
Member

aduth commented Apr 8, 2019

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.

@mrwweb
Copy link

mrwweb commented Aug 19, 2020

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

@mdrovdahl
Copy link

Aha, I suspect this may be the root issue for what I just reported over here: Automattic/wp-calypso#45098

@mdrovdahl
Copy link

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

@mtias mtias added the [Priority] High Used to indicate top priority items that need quick attention label Sep 3, 2020
@mtias mtias added this to the Gutenberg 9.0 milestone Sep 3, 2020
@mrfoxtalbot
Copy link

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.

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 [Priority] High Used to indicate top priority items that need quick attention [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants