Skip to content

Hub pages 3/4: {get-started} - #3827

Draft
florent-leborgne wants to merge 6 commits into
feature/hub-card-explorefrom
feature/hub-get-started
Draft

Hub pages 3/4: {get-started}#3827
florent-leborgne wants to merge 6 commits into
feature/hub-card-explorefrom
feature/hub-get-started

Conversation

@florent-leborgne

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

Copy link
Copy Markdown
Member

Part 3 of 4, based on #3826. Implements elastic/docs-content-internal#1382.

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

The onboarding section of a hub page. It gives a new reader one opinionated path to a first success, before they face the full link list. The section is optional.

Structure

A numbered list of steps, of any length. The first often offers two equally weighted ways to start, and the rest are single steps.

Shape Fields Renders as
Options title, options[] Two or more equally weighted paths side by side, each with a command or a link
Link title, description, link, link-label The whole card is clickable
Plain title, description A static card

Nothing renders between the intro and the numbered list. An install command belongs in steps[0].options[], which keeps the whole path inside the numbered sequence. The prototype's install and tutorial fields are removed: they placed content above the steps, which the structure does not call for.

Implementation choices

A linked step hovers grey, not blue. Blue makes one step in a sequence look like the call to action, and it differed from the other card types. Every card on a hub page that is itself a link now hovers the same way, matching {page-card}.

The step count is not fixed. The prototype's layout assumed three. The directive now counts the steps that flow in columns and sets the track count: three across when they divide by three, two when they are even, so the last row is never short. A step carrying options spans the full row and takes no track. Below 640px of available width the steps stack into one column, measured on the section rather than the viewport, because the left sidebar narrows the body.

A step option's command uses the standard code block. It renders inside .highlight pre with a language class, which is what the site's copy button and syntax highlighter select on. Both attach with no extra wiring, because the hub layout kept the markdown-content id in #3825. That gives the Copy affordance the designs show.

Step numbering sits before the title. The section describes a sequence, and the number is what carries that. The designs put it in the card corner, which turns it into a decorative counter the reader meets after the title.

No per-step icon. The prototype has steps[].icon, resolved through EuiSvgIcons. It is removed. In the designs the icons restate the step title, the number badge is already the card's visual anchor, and a schema field that exists for decoration means every author picks icons that then drift between hubs.

Machine-readable output. The LLM export renders steps as an ordered list, with options as sub-items carrying their command or link. The search body gets nothing, as with the other hub directives.

Example page

The example hub's section uses every field once and shows all three step shapes. It carries four steps, so the preview shows a section that is not the three-step case the prototype assumed.

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/GetStarted.fs covers all three step shapes, the track count for four steps with and without a wide step, a step option's command landing in a highlightable code block, automatic numbering, that nothing renders above the steps, and two failure paths.

Screenshots to add or update

None attached. The side-by-side option layout in step one is worth checking on the preview.

@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from ed21c2f to 8cc8882 Compare August 11, 2026 07:56
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from 8cc8882 to 62b273f Compare August 11, 2026 08:50
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from 62b273f to 2e0a6f7 Compare August 11, 2026 13:32
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from 2e0a6f7 to efa41f6 Compare August 11, 2026 15:16
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from efa41f6 to d29c99e Compare August 11, 2026 15:50
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from d29c99e to f02a11e Compare August 11, 2026 16:11
@florent-leborgne
florent-leborgne force-pushed the feature/hub-get-started branch from f02a11e to 13a991f Compare August 11, 2026 16:19
florent-leborgne and others added 6 commits August 13, 2026 19:09
The onboarding section of a hub page. It gives a new reader one opinionated path
to a first success, before they face the full link list. The section is optional.

Keeps the top-level install and tutorial pair as first-class fields rather than
treating it as prototype back-compatibility. The designs use exactly that shape:
a copyable command beside a tutorial card, with numbered steps below.

The install snippet renders inside `.highlight pre` with a language class, which
is what the site's copy button and syntax highlighter already select on. Both
work with no extra wiring, because the hub layout kept the markdown-content id.

Steps take one of three shapes: plain, a whole-card link, or two or more equally
weighted options side by side. Numbering is automatic and sits before the title,
because the section describes a sequence and the number is what carries that.

Drops the prototype's per-step icon field. The icons restate the step title, the
number badge is already the visual anchor, and a schema field for decoration
makes every author pick icons that then drift between hubs.

The LLM export renders the steps as an ordered list with options as sub-items.
The search body gets nothing, for the same reason as the other hub directives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Martijn's review on #3825 covered the whole page, so the same rules apply
here.

- Get started type moves onto the site's scale. The values it carried were
  16px-root arithmetic against a 14px root, so every one rendered small.
- Step numbers move from grey-70 to ink-light. grey-70 reads at 3.31:1 on
  white, short of the 4.5:1 minimum, and ink-light carries the same quiet
  weight at 7.03:1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Martijn's point about tiny fonts applies to every piece of hub text. Step
descriptions, option labels, option descriptions, option buttons, and the
step links now read at the body size. The install command keeps 14px, which
is what every other code block on the site renders at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both links that carry an arrow here send the reader onward out of the card,
which is one of the two cases the site marks. They now use the same glyph
and hover slide as every other hub arrow. The option button carries none,
like every other button on the site.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing in the schema limited the section to three steps. One CSS rule did:
when a step carried options, the grid locked to two tracks, which suits one
wide step and two others exactly. A fourth step left one card alone on a
half-width row.

The directive now counts the steps that flow in columns and sets the track
count. Three across when they divide by three, two when they are even, so
the last row is never short. A step carrying options still spans the full
row and takes no track. Below 640px of available width the steps stack.

The width is measured on the section rather than the viewport, because the
left sidebar narrows the body.

The example hub gains a fourth step, so the preview shows the new
arrangement.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The step card hovered to a blue border while the other two card types
hovered to grey. Blue also makes one step in a sequence look like the call
to action. It now uses grey-80, the same treatment as {page-card} and a
linked {link-card}.

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