Repository navigation
feat: add ready-made liveblog page patterns - #338
Merged
Merged
Conversation
Contributor
Author
|
Self-review summary: 18 rounds on this branch before handoff. Rounds 1 to 8 ran before the branch was rebased onto trunk after #346, so their commit IDs are from the earlier history. Accepted:
Declined:
Deferred (not blocking)
|
thomasguillot
force-pushed
the
feat/scoreboard
branch
from
November 17, 2026 16:49
0751354 to
81b78b4
Compare
thomasguillot
force-pushed
the
feat/page-patterns
branch
from
November 17, 2026 16:49
437549f to
b21b3a7
Compare
thomasguillot
force-pushed
the
feat/scoreboard
branch
from
November 17, 2026 19:17
81b78b4 to
c2c8fec
Compare
thomasguillot
force-pushed
the
feat/page-patterns
branch
from
November 18, 2026 06:45
b21b3a7 to
69f55e4
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ligned Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… column Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve one Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thomasguillot
marked this pull request as ready for review
November 27, 2026 20:45
Contributor
|
Hey @thomasguillot, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publishers building a liveblog page start from an empty page and assemble the feed, the Live badge, a Follow button and a timer by hand. This adds nine ready-made pages in a "Rolling Coverage - Pages" pattern category: insert one, pick the liveblog, and the page is done.
Builds on #336 (Summary), #337 (Score) and #346 (status badge), all merged. The live pages lead with the Summary, and the Match pages use the Scoreboard with its status line as a badge.
What changes
The block inserter's Patterns tab has a new Rolling Coverage - Pages category, named like the Newspack ones. Each pattern is a whole page built from core blocks and the plugin's blocks, so everything in it can be edited.
With this change:
A few block and layout changes came out of testing the pages:
The patterns appear in the inserter only, not in the new-page "Choose a pattern" window. The docs site has a new Page patterns guide, and the affected docs screenshots are retaken.
How to test
Technical details
Page_Patternsregisters the category and nine patterns oninit(priority 11) withfilePath, so a pattern file loads only when a pattern is read. NoblockTypesortemplateTypes, so they stay out of the new-page modal.layoutIdis a site-specific pattern ID). Each pattern embeds its feed's layout as the Rolling Coverage block's inner blocks, filled fromLayout_Templates::get_blocks(), the same markup the built-in layout renders. Once layouts can be named by slug, the patterns could reference them instead.Page_Patterns::scoreboard()builds the bound paragraphs in PHP from the theme's presets, mirroringsrc/blocks/scoreboard/template.ts, the dash included (its class lets the block hide it from screen readers). Classes are kebab-cased as core saves them, so the blocks validate on any theme. On one line each team sits in a group withselfStretch: fixedat 50%, so both halves shrink alike and the dash stays centred.outlinesetsborderColor: base-3when the palette has it, else acurrentColorborder;status_firstputs the status above the stacked teams.accentoption onPage_Patterns::scoreboard().showStatusAsBadge, and the feeds setarchivedNoticeShow: false. The side scoreboard sits in a core Group withposition: sticky; its column stretches to the feed's height. Core outputs sticky only on themes withposition.sticky(the Block Theme), so on the classic theme it scrolls with the page.var(--wp--preset--color--base-3, var(--newspack-theme-color-border, #ddd)), the fallback Every live story uses, so the classic theme gets its own border colour. The Follow button's label group getsmargin-inline: auto, which centres it inside aninline-flextheme button at any width.typography.fontSizesupport;style.scsssets newspack-ui's extra-small size on the wrapper and restates the badge's tokens inem, so the badge scales and matches newspack-ui at the default size.{{date_format}}token, and arender_block_core/post-datefilter (mark_earlier_day_entry_date()) that addsdata-rc-dayandhiddenwhen the entry is from the site's current day (wp_date()). The view re-checks on load, on the 60-second tick and for new entries (earlier-day-dates.ts), using the site's timezone from the frontend config, so cached pages and pages left open past midnight stay right.Entry_Bindings::updated_line()renders Coverage Status's strings and<time datetime data-rc-relative>markup, whichkeepRelativeDatesCurrent()keeps current;applySummaryCard()refreshes a card the poll swaps in. Feeds, Lite Site pages and lite polls keepupdated_text()'s clock time (shows_relative_time(),render_with_clock_time()), and the summary cache key separates lite and full. The clock form has its own translator context (time of day).Page_Coverages::coverage_for_block(),Placements::build()anduseBlockCoverage().Page_Patterns::side_columns_open()adds Newspack Blocks'is-style-first-col-to-secondwhenNewspack_Blocksexists, which shows it second from 782px up.site/content/docs/guides/page-patterns.mdx, block READMEs/DEVELOPMENT, CONTRIBUTING. The docs seed builds nine pages from the registered patterns for the screenshots.Self-review: 18 rounds (Opus 5.5), one blocker fixed.