Plugin Directory: Try using core Gallery & Image blocks for screenshots#524
Plugin Directory: Try using core Gallery & Image blocks for screenshots#524ryelle wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
❤️ I was thinking about this, and whether there's any routinely maintained gallery block plugin that implements a slider-type we currently have. I then queried the number of screenshots plugins had, and found multiple with over 100 screenshots 🤯 Here's that data:
|
As a followup to this, I would suggest the overall height of the section is limited to ~3 rows of screenshots or an absolute arbitrary pixel count, with the rest hidden behind a |
|
This would also fix https://meta.trac.wordpress.org/ticket/2273 and render #67 obsolete. |
This switches the plugin directory's screenshot section to use a pattern with core blocks instead of the shortcode. It loads the screenshots as Image blocks inside a Gallery instead of the React screenshot UI. This removes the React dependency from the page, so it's no longer necessary to load all of that JS, saving about 140KB.
I'm not sure this is merge-able as-is since it does look very different than the current UI, but I saw the ticket and wanted to give it a shot.
Fixes https://meta.trac.wordpress.org/ticket/8083
Notes
[wporg-plugins-screenshots]code can be removed before merging (I don't think they're used anywhere else).Screenshots
This uses the default layout of a 3-column gallery, which is pretty divergent from the current slideshow style of images, especially when they have captions. As for captions, they're visible on all images now, but they do not show up in the lightbox (see WordPress/gutenberg#60469).