Skip to content

Slash inserter: consider to simplify the search results for better clarity #5643

@afercia

Description

@afercia

See related #5592

Playing a bit with the Slash inserter, I was initially a bit puzzled by (what appeared to me) the lack of accuracy in the search results. Please see the screenshot below:

screen shot 2018-03-13 at 16 32 21

For example, typing /t displays some results: most of them starts with t but there are also: "Paragraph", "Heading", and "WordPress.tv".

Or, typing /i displays also "Gallery", "Cover Image", and "Flickr".

In the first example, I was typing t to search for the Table block, and I couldn't understand why the inserter was showing me also the Paragraph, the Heading, etc. It looked like an error to me.

Then, I realized block types have "aliases" (keywords) to make the search smarter. The Paragraph block has a text keyword, the Heading has a title keyword so they match the t. However, WordPress.tv doesn't have any keyword and I suspect the dot before tv plays a role here.

Same for the /i: Gallery has an images keyword and Flickr has an image keyword. However, Cover Image doesn't have any keyword and I suspect it matches the beginning of the second word (Image).

Regardless of the edge cases above, I'd tend to think the smart search based on keywords makes more sense in the Popover Inserter, but I'm not fully convinced it adds a value in the Slash inserter.

In this case, the Slash Inserter looks like sort of a menu: my focus instinctively goes to the first letter of the menu items and the search results that don't start with the letter I just typed look just wrong to me.

I'd suggest to consider to disable the keyword-based search in this specific instance of auto-completer and search just for the block name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] InserterThe main way to insert blocks using the + button in the editing interface[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions