Repository navigation
VideoPress: let the playlist blocks show a site playlist and sort by last update - #53657
Conversation
…update The Video Playlist block gets a `source`: its own videos ( default ), or a playlist published on the site, picked in the editor ( the most recently updated when none is picked ). The playlist index skips blocks that show another playlist. The All Playlists block gets an `updated` order and a `showUpdated` option ( "Updated 2 weeks ago · 1 hr 12 min" ). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Videopress plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 7 files. Only the first 5 are listed here.
3 files are newly checked for coverage.
|
Channel_Blocks registers no blocks yet, so it drops the empty block loop ( Phan: PhanEmptyForeach ) until the first channel block brings it in. Tests cover the `updated` order and `showUpdated` meta of the All Playlists block, the playlist record lookups and the `index` source, the editor data wiring, and the editor's source panel, playlist picker and All Playlists toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ditor A Video Playlist block that shows a playlist from the site rendered a placeholder in the editor. It now previews that playlist's videos, the picked one or the most recently updated, with the block's own display settings, the same way the site renders it. The editor data now carries each playlist's videos; the placeholder stays for a playlist without videos, one that is no longer published, or a site without playlists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9751702 to
b8f5ac4
Compare
The block's `source` was resolved by a filter that only the channel feature hooked, so on a site without a channel theme a block showing a playlist from the site rendered nothing on the published post. The filter is now hooked wherever the Video Playlist block is registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ff0c36e to
e6c39d0
Compare
Proposed changes
sourceattribute — the block's own videos ( default, unchanged ) orindex, a playlist published on the site, withsourcePlaylistIdpicked from a dropdown in the editor ( empty = the most recently updated playlist ). The videos, title and description come from the playlist index when the block renders on a channel site. In the editor, the block previews that playlist's videos with its own display settings, as the site renders them. The playlist index skips blocks that show another playlist, so they never become playlists of their own.updatedorder ( "Recently updated" ) andshowUpdatedoption, which adds "Updated 2 weeks ago · 1 hr 12 min" under each card.Channel_Blockshands the editor the site's playlists ( key, title and videos ) for the picker and the canvas preview through an inline script, so the WordPress.com Simple editor gets them too; it is registered from the package and from Jetpack's WordPress.com block loader.These are additions to blocks that already exist; the defaults keep current markup as it is. The page per playlist that builds on them is #53504.
Part 4 of 11 of a stacked series
The VideoPress channel theme support is split so each change can be reviewed, tested and deployed on its own. Each PR is based on the previous one; merge them in order.
→ 4. VideoPress: let the playlist blocks show a site playlist and sort by last update #53657 — VideoPress: let the playlist blocks show a site playlist and sort by last update
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jp test php packages/videopress;pnpm run buildin the package.🤖 Generated with Claude Code