Repository navigation
VideoPress: add an All Playlists block - #52724
Conversation
|
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: The Jetpack plugin has different release cadences depending on the platform:
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 3 files.
9 files are newly checked for coverage. Only the first 5 are listed here.
Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
2d83687 to
b902836
Compare
|
Stacked on #52729, so the coverage service has no baseline for this branch; adding the code-coverage opt-out label until the base merges and this PR retargets to trunk. |
b902836 to
b1f20a0
Compare
a9be381 to
26fcd65
Compare
…the block from the Styles tab
Second half of the All Playlists work, stacked on the playlist index PR (see "Stack" below). Implements the block per the design's sections 2a–2d (sidebar settings, gallery, list with "Load more", edge states).
Stack
Proposed changes
videopress/all-playlistsblock ("All Playlists"), a Query Loop-style block that lists every Video Playlist published on the site, read from thevideopress_playlist_indexoption. Server rendered byAll_Playlists_Block::render(); the editor canvas shows the same markup through core's block-renderer endpoint.playlists-pagequery argument.playlist/fetch-live-metadata.tsso both view scripts share it, with the token retry for private videos).<h2>fallback.color-mix, with the light-theme values as the fallback), so a dark background stays legible.h2/h3beat inheritance from the block wrapper, so font family, size, style, weight, line height, letter spacing, text transform, decoration and text color set in the block's Styles tab are also forwarded as--vpap-*custom properties (with ahas-vpap-<property>class per setting) and applied to the playlist titles and the header heading. Only properties the block actually sets are forwarded, so the theme still styles the headings otherwise. The header Heading block's own settings still win, since WordPress writes them inline or with!important. Values are limited to presets and plain CSS values in both the PHP render and the editor.<h3>playlist titles carry no typography of their own any more, so the theme's heading styles (family, weight, size, line height) and the block's Styles settings apply to them; the rest of the card text is sized inem, so a block font size scales descriptions, badges and pagination with it.hydrate-poster.ts.method_exists()as usual).Screenshots
Rendered through the real callback with the built assets; posters are stand-ins, and the "Glaze Chemistry" card has a first video the lookup refuses.
With a custom heading block (H3, italic, custom color) and block-level text/background colors from the Styles tab:
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Automated:
jp test php packages/videopress(All_Playlists_Block_Test: settings normalization, cards, toggles, ordering, both paginations, forwarded block styles),jp test js packages/videopress(registration, sidebar, preview states, the view script's posters and "Load more"),jp phan packages/videopress,pnpm run typecheck, PHPCS, ESLint and Stylelint on the touched files all pass locally. The Jetpack plugin'sVideoPress_Video_Extension_Testwas not run locally; CI covers it.Manual (a site with VideoPress active and the package built with
jp build packages/videopress):Set a font family, style, weight and text color on the All Playlists block: the playlist titles, descriptions and the "Playlists" heading all change. Then give the heading block its own font or color: the heading keeps its own, the rest of the block keeps the block's.
The playlist titles use the theme's heading styles; change the theme's heading font or the block's font family and size and confirm the titles and card text follow.
?playlists-page=2shows the rest.🤖 Generated with Claude Code