Skip to content

Hub pages 4/4: {whats-new} - #3829

Draft
florent-leborgne wants to merge 3 commits into
feature/hub-get-startedfrom
feature/hub-whats-new
Draft

Hub pages 4/4: {whats-new}#3829
florent-leborgne wants to merge 3 commits into
feature/hub-get-startedfrom
feature/hub-whats-new

Conversation

@florent-leborgne

@florent-leborgne florent-leborgne commented Aug 11, 2026

Copy link
Copy Markdown
Member

Part 4 of 4, based on #3827. Implements elastic/docs-content-internal#1383.

Demo: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3829/examples/products/docs-builder

A recency panel for a hub page. A reader who bookmarks a hub wants a quick answer to "what changed recently" without hunting through release notes.

With this merged, docs/examples/products/docs-builder.md is a complete hub page.

Usage

One line for the common case:

:::{whats-new}
:product: docs-builder
:::

Omitting :product: accepts the same schema as an inline YAML body, for a one-off panel.

Implementation choices

The panel content lives in the content repository. The prototype reads config/whats-new.yml from docs-builder, so a writer editing a highlight card opens a pull request against the build tool and waits for a release. It now reads hub-whats-new.yml from the root of the current documentation set, beside changelog.yml and redirects.yml.

That makes the directive documentation-set scoped. It cannot render another repository's panel, and no syntax would fix it. Cross-link resolution maps pages through the link index, and a YAML data file is not a page. In an isolated build the other repository is not checked out, so there is no file to read. Every hub page lives in the same repository as its content file, so this costs nothing today. elastic/docs-content-internal#1383 has been updated to drop the earlier claim that any page could render any product's panel.

Three schema fields are removed. items[].meta and the top-level badge are in the prototype's schema but no view reads them. An option that renders nothing is worse than no option. items[].badge is removed too: a badge reading "New" inside a What's new panel is redundant, and tag already carries per-item categorisation.

Machine-readable output. The LLM export keeps the date and tag alongside each title, which is what a reader asking "what changed recently" wants. The search body gets nothing, as with the other hub directives.

Example content

docs/hub-whats-new.yml uses every remaining field once, including two release-links and an upgrade-link, so it can be copied and trimmed. It carries five items, which fills the three-column grid cleanly alongside the two-column featured card.

Follow-up, not in this change

A skill in docs-content that updates hub-whats-new.yml from the release notes of each product with a hub page. It should read the changelog YAML bundles rather than rendered pages, since those are structured and already feed release notes.

Testing

./build.sh unit-test passes. dotnet format and npm run fmt:check are clean. A full docs build reports 0 errors and 0 warnings.

tests/authoring/Blocks/Hub/WhatsNew.fs covers the inline-body path, the featured card spanning two columns, release and upgrade links, and three failure paths including an unresolvable product key.

Screenshots to add or update

None attached. The five-card grid with its featured span is worth checking on the preview.

florent-leborgne and others added 3 commits August 12, 2026 21:04
A recency panel for a hub page. A reader who bookmarks a hub wants a quick answer
to "what changed recently" without hunting through release notes.

The panel content moves out of the build tool. The prototype reads
config/whats-new.yml from docs-builder, which means a writer editing a highlight
card opens a pull request against the build tool and waits for a release. It now
reads hub-whats-new.yml from the root of the current documentation set, beside
changelog.yml and redirects.yml.

That makes the directive documentation-set scoped. It cannot render another
repository's panel, and this is a constraint rather than a syntax gap.
Cross-link resolution maps pages through the link index, and a YAML data file is
not a page. In an isolated build the other repository is not checked out, so
there would be no file to read. Every hub page lives in the same repository as
its content file, so the limit costs nothing today.

The common case stays one line, `:product: <key>`. Omitting it accepts the same
schema as an inline YAML body, for a one-off panel.

Adds containsRawHtml to the authoring assertions. The pretty-printed comparison
only matches a childless element or a snapshot taken from the outermost element
of the directive output, so asserting a class on a container previously meant
snapshotting its whole subtree.

Follow-up, not in this change: a skill in docs-content that updates
hub-whats-new.yml from the release notes of each product that has a hub page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Hub heroes fall back to initials when a product key is missing from the
inline SVG map. Logstash hubs need the product mark.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Martijn's review on #3825 covered the whole page, so the same rule applies
here. What's new type moves onto the site's scale. Every raw font size in
hub.css is now a scale token.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants