[wp-meta] [Making WordPress.org] #5207: Improve heuristics for detecting block assets

Making WordPress.org noreply at wordpress.org
Thu May 21 23:51:18 UTC 2020


#5207: Improve heuristics for detecting block assets
------------------------------+---------------------------
 Reporter:  tellyworth        |       Owner:  coreymckrill
     Type:  enhancement       |      Status:  assigned
 Priority:  high              |   Milestone:
Component:  Plugin Directory  |  Resolution:
 Keywords:  needs-patch       |
------------------------------+---------------------------

Comment (by coreymckrill):

 The above patch refactors block and asset detection to prioritize data
 from any existing block.json files first. Then if those aren't available,
 or they don't contain any of the `style`/`editor` properties, it goes back
 to hunting for patterns, starting with build/dist directories.

 This narrows down the list of blocks with no assets to one: `pdf-viewer-
 block`. This block unfortunately, I believe, has a
 [https://plugins.trac.wordpress.org/browser/pdf-viewer-block/tags/0.1
 directory structure] that we cannot easily traverse using heuristics,
 without potentially getting a bunch of false positives.

 This patch also improves the hits on existing block assets lists, reducing
 false positives. There were a couple that previously included both src and
 build versions of their scripts, but this is more successful at isolating
 just build files.

 This patch does not do much to fix the list of plugins that are missing
 blocks. As noted above, I believe some of these don't contain actual
 blocks to begin with.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5207#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list