Gutenberg: Block directory showing irrelevant blocks

Created on 29 Aug 2020  路  9Comments  路  Source: WordPress/gutenberg

Describe the bug
I'm not sure if this is the correct place to post this, but there needs to be tighter control of what content can be included in plugin descriptions for Block Directory plugins. Either that, or the Block Directory search needs to be greatly improved. The Block directory is currently too open for spamming and providing irrelevant results.

If I bring up the Block Inserter now and perform a search for 'map', I'm currently shown 10 search results. Out of these 10 results, 8 of them are from the same author. Now, this wouldn't be a problem if that author had 8 individual map Block Plugins, but they don't. Out of all 10 results, only 3 are actually relevant and provide any sort of 'map' feature. The other 7 results, from the same author, are showing purely because the description for every single one of their Block Plugins, includes links to each of their other blocks (including their one Map block). This isn't such a big issue when browsing the Block Directory on dot Org, but when there's very limited space in the Block Inserter where these results are being shown, when descriptions for these blocks are truncated so you can't see if the results are truly relevant, and when there's no option to read the full description for each block returned in the results, this in effect is spamming the Block Directory and making the experience worse for the end user.

I'm not going to say this was a deliberate attempt by the developer to get their blocks showing in the Block Inserter, but I think it's pretty obvious that as the Block Directory becomes more popular, this issue is going to get worse, and in the end, the results are going to be mostly useless and hard to sort through.

Video: https://share.getcloudapp.com/OAuqjpYk

To reproduce
Steps to reproduce the behavior:

  1. Edit a page
  2. Click on the Block Inserter at the top of the page
  3. In the Block Inserter search field type map
  4. View all the irrelevant results simply due to the developer linking to all their other block plugins in their plugin descriptions

Expected behavior
With such a small UI, the results for the Block Directory search need to be more precise

Editor version (please complete the following information):

  • WordPress version: 5.5
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? default
  • If the Gutenberg plugin is installed, which version is it? N/A

Desktop (please complete the following information):

  • OS: macOS 10.15.6
  • Browser: Firefox 79.0
[Feature] Block Directory

All 9 comments

This issue is also described in https://github.com/Automattic/wp-calypso/issues/45136 but opening an issue here seems like the more appropriate place.

I guess this is how this is supposed to function. @sirreal says:

This is the expected behavior for Gutenberg at this time. Any proposals and changes should happen in the Gutenberg project.

Searches are sorted based on frequency. Depending on usage, you may get different results.

However, I do think if I type /map or /image explicitly and press enter, I should get the map or image block.

Searches are sorted based on frequency. Depending on usage, you may get different results.

However, I do think if I type /map or /image explicitly and press enter, I should get the map or image block.

Noting that the logic to make the call to pull up existing blocks lives specifically in the inserter component which is separate from the problem with Block Directory block results defined in this issue. It probably makes sense to create a new ticket for updates to that functionality.

I've made some tweaks to the Search algorithm in https://github.com/WordPress/wordpress.org/commit/bc8278dacc0526ae6b7713d00846cca1004f69fe which puts less weight on the description field and filters search results to only show the top 99% of results, which excludes many of the results that were being shown here that mentioned the search term, but really wasn't a useful result.

@maddisondesigns Can you do some more searches to see if it seems better?

Some terms will still return seemingly irrelevant results when there's simply no good result still, there's some complex limitations here related to good search results for non-english searches.

@dd32 Great work Dion! That's working a lot better. Using my 'map' example from above, it now just returns the 2 main Map Blocks from the Block directory. Have also tried with a bunch of other search teams like 'team member', 'contact', 'animated' and a bunch of other terms, and the results seem a lot better now 馃憤

Just as a side question, is there anyway to perform a search specifically in the Block Directory on dot org? If I search for 'images' for example, the Block Inserter will simply show me the core image related blocks. If I browse to the block directory on dot org, I can see all the single block plugins, but if I type anything in the search field on that page, it simply searches the whole plugin directory. Even if I type 'image block' in the search field, it still performs a search on the entire plugin directory.

It would be really useful to be able to perform a search in just the Block Directory itself, so that people can easily find single-block plugins. Alternatively, when a search is performed in the Block Inserter, perhaps they should also include a link below all the returned results, to allow people to also search the Block Directory because even though the search might return some core blocks, they might not actually be ones that are suitable.

It would be really useful to be able to perform a search in just the Block Directory itself, so that people can easily find single-block plugins. Alternatively, when a search is performed in the Block Inserter, perhaps they should also include a link below all the returned results, to allow people to also search the Block Directory because even though the search might return some core blocks, they might not actually be ones that are suitable.

@maddisondesigns

Take a look at this issue: #23894.

Just as a side question, is there anyway to perform a search specifically in the Block Directory on dot org?

Right now, no, and it's painful for me testing these search changes as a result :) I'm looking at options available to make search limiting to Blocks easier to trigger for my own (and others) sanity in testing these search changes.

Even if I type 'image block' in the search field, it still performs a search on the entire plugin directory.

I'm probably going to add a checkbox to the search page that limits it to Blocks only, but at first, I don't think it'll be exposed in the UI unless the search is triggered from /browse/block/ until https://meta.trac.wordpress.org/ticket/2753 is implemented..

That's because we also don't _really_ have a Block Directory section on WordPress.org/plugins right now, although /browse/block/ exists I don't believe it's linked to from anywhere as intending to be a good interface for browsing said blocks. I believe proper interface was on the roadmap, although hasn't eventuated.

Since there's no changes needed to Gutenberg, and the search has been tweaked on the WordPress.org side, I'm going to close this issue.

I'll also mention that the search filtering has been implemented. Searched initiated from https://wordpress.org/plugins/browse/block/ will limit to blocks and have the same filtering as within the editor itself. No other UI is present except when triggered through the URL param or via that page, it's intended mostly for ease of testing at this point in time.

@StevenDufresne Thanks for pointing out that existing issue. Glad to see it's already being considered.

@dd32 That small change to the search on the /plugins/browse/block/ page is really useful. The added bonus of not needing any UI to limit the search is great! Thanks for implementing that.

@dd32 I've arrived here after finding out that my block directory plugin (https://wordpress.org/plugins/lifterlms-lite-lms-progress-tracker/#developers) used to be install-able through the block inserter but can no longer be installed. I've been directed to the changeset that references this issue (https://meta.trac.wordpress.org/changeset/10228) as a possible "reason".

Previously terms found in the plugin's title would result in it displaying but now that's no longer true.

Terms like "Lite LMS", "Course", "Progress", etc... These terms are also found in the plugin's description.

I asked about this in #pluginsreview on Slack and you were "summoned" to dig into my questions.

I'm trying to figure out if there's something I've done wrong or if there's actually an issue somewhere. I'm sure this isn't the correct place to report this but I can't find a trac ticket related to the changeset and I struggle to keep up with what goes on in slack so if you need more information or a new issue or ticket (or if I should leave you personally alone) just let me know.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spocke picture spocke  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments

moorscode picture moorscode  路  3Comments

jasmussen picture jasmussen  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments