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

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

Closed
afercia opened this issue Mar 15, 2018 · 12 comments
Closed
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Enhancement A suggestion for improvement.
Milestone

Comments

@afercia
Copy link
Contributor

afercia commented Mar 15, 2018

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.

@afercia
Copy link
Contributor Author

afercia commented Mar 15, 2018

Re: one of the edge cases, seems the dot is really considered a word separator:

screen shot 2018-03-15 at 20 13 34

@jeffpaul
Copy link
Member

Suggestion to possibly sort items that come up in search via keywords second to matches of the actual block name first. So in the /t example the order could be: Twitter, TED, Tumblr, Table, Text Columns, Paragraph, Header, WordPress.tv. I do see benefit in including keyword matches in the results, just maybe having those appear second may help?

@jeffpaul jeffpaul added [Type] Enhancement A suggestion for improvement. [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Mar 21, 2018
@afercia
Copy link
Contributor Author

afercia commented Mar 21, 2018

@jeffpaul that's certainly an option :) I'd suggest to try to fix the edge cases anyway (e.g. the dot, multiple words with space).

@jeffpaul
Copy link
Member

@afercia I actually think the edge cases are useful as I could see someone trying to remember "what was that something something dot com integration that I use for a block?" and being able to type in /com and see /Meetup.com would be useful. Same thing for multiple words with a space (e.g. Cover Image).

@mtias
Copy link
Member

mtias commented Apr 3, 2018

We could also make it so that aliases need exact matches (i.e. you have to type /text for paragraph to appear) or at least have to match >3 letters.

We could also make it so that the block name transforms to the alias if it's matching an alias (so it'd say "Text" instead of "Paragraph" next to the block).

@mtias mtias added the Needs Design Feedback Needs general design feedback. label Apr 3, 2018
@jasmussen
Copy link
Contributor

+1 to Matías suggestion. It is very nice/important to be able to search for aliases in the inserter and slash command, in the case of finding "Heading" when searching for /t is a matter of it also picking up "Title" which is a heading alias.

@karmatosed
Copy link
Member

I also agree, having aliases is going to make this more magic for users. I like the idea of the block name transforming to the alias if it's matching one.

@karmatosed karmatosed removed the Needs Design Feedback Needs general design feedback. label May 19, 2018
@karmatosed karmatosed added this to the Merge Proposal: Editor milestone May 19, 2018
@mtias mtias modified the milestones: Merge: Editor, WordPress 5.0 Oct 12, 2018
@mtias mtias added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Nov 12, 2018
@davewhitley
Copy link
Contributor

davewhitley commented Dec 14, 2018

Related issue to search (not specifically the slash inserter, since I imagine search is the same for all insertion types):

It can be hard to find some blocks via search and should probably have more aliases, for example, the File block.

Scenario: I want visitors to download an mp3 on my site, so I search for "download", "MP3", and "button", but none of those queries return the File block in the results. Download and mp3 return nothing, and button returns the button block, but afaik it doesn't have that download file functionality, it's just a link.

screen shot 2018-12-14 at 3 03 22 pm

I would like this issue to get bumped to maybe normal since I think it encompasses block searching in general.

@mapk
Copy link
Contributor

mapk commented Oct 21, 2019

@afercia, I believe the searching function and aliases have been worked on since the creation of this issue. I haven't noticed any issues searching myself, but wanted to check with you before closing this. Do you still find any problems?

@afercia
Copy link
Contributor Author

afercia commented Oct 21, 2019

I guess the algorithm improved a bit but maybe needs one more round of iteration. The point is it forces users to type more characters than needed.

As a user, I would like to type, for example, t and get the most logical results in the first positions so I can just press Enter and I'm done. Instead, I'm forced to type more characters to get what I actually want or to use the arrow keys / mouse to select the block I need.

Some examples in the screenshot below:

  • type t because I want a table: I get a heading in the first position. Table is at the 7th position.
  • type b for a button: I get a list.
  • type p for pullquote: I get an Image (?) then a Gallery (?) then a file (??). Puzzling. Under the hood, the keywords are photo, photos, pdf and that explains the match with the p
  • type s and I get a... heading (??) followed by a group (??). The involved keywords are subtitle and section

There are way more examples. To me, it's an annoyance because I'd like to get as first results the ones that actually start with the character I typed. I'd like to suggest to review a bit how this works and give more "weight" to the results that have an actual match with the first letter of the main block name.

Screenshot 2019-10-21 at 18 33 06

@mtias mtias removed the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Aug 30, 2020
@mtias
Copy link
Member

mtias commented Aug 30, 2020

Let's bump priority of this one, it seems to have been getting worse. It might also make sense to reduce the number of matches, it looks a bit excessive.

Other issues for reference: #14868, #24651.

@youknowriad
Copy link
Contributor

#25105 just landed and I think solved most of the issues here.

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 [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

8 participants