Skip to content

Redesign the API landing and group pages as cards and a ledger - #4997

Merged
reakaleek merged 33 commits into
mainfrom
api-group-landing-design-ad52c764
Nov 23, 2026
Merged

reakaleek merged 33 commits into
mainfrom
api-group-landing-design-ad52c764

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The API product landing page now lists its groups as two-column cards, and a group page lists its operations as one framed ledger with its own Endpoints heading and On this page list. The change stays on those two pages: the operation page is untouched.

Affects: API reference, Site UI

Prompt summary: Make the API landing page and the group landing page look more deliberate and use the empty third column, following what modern API docs do. Keep the operation page as it is.

Why

The landing page lists every operation, which repeats the sidebar and runs to thousands of rows for Kibana. A group row shows a method chip and a path with no structure, so a reader scans them one by one. The right column is empty on both pages, and the "On this page" list is larger than the docs' own and missing on the group page.

What

Landing page: groups as cards

The page lists each group once, with its endpoint count and a two-line summary of its description. Groups sit two to a line from 36rem up, in separate cards of equal height. Each classification heading gets its own list, set as a role heading so the docs scroll spy does not track it. A group card says what its group page says, including a supplemental description. An Endpoints heading starts the list, and the facts rail keeps the server URLs.

Group page: a route ledger

Operations sit in one framed list. The method is its own column, so the verbs line up, and the column grows to fit a joined chip, while a row with four or more methods stacks as on a phone. Then comes the title with its badges, then the route as plain code that wraps at a slash. A route with exactly one optional segment shows it in brackets, for example [/{index}]/_search; with several, the route stays as written. Badges that wrap onto a second line keep a 4px gap. A count caption and an Endpoints heading sit above the list, and the intro takes a lead style.

On this page

_ApiToc now uses the docs list's markup, sizes and Mier B heading. The group page lists its intro headings, extra sections and Endpoints, built with the same helper as the landing page (ApiViewModel.WithEndpoints). Neither an intro heading nor a supplemental section takes the endpoints anchor. The list carries the data-toc hooks in both looks, and initToc takes a selector, so the production bundle binds only the operation page's section links and the design-system look's scroll spy marks the current section without doubling the production one. The supplemental guide notes that #endpoints is reserved on tag pages. The list now also shows in the design-system look, which never built the Tailwind classes it relied on, and each stylesheet hides it where the rail drops under the article.

Both stylesheets, and a design-system gap

Every rule lands in api-docs.css and api-reference.css, each with its own tokens. The design-system stylesheet had no .api-group-heading rules at all, so the title and badges were an unplaced block there. They now sit in the title column. The browse-api synthetics journey follows the new path: landing, then a group, then an operation.

Verify

mise run test
mise run journeys:test
mise run serve

Then open /api/elasticsearch/ and /api/elasticsearch/group/endpoint-analytics. FEATURE_NAVIGATION_PREVIEW=true mise run serve shows the design-system look.

Check on the preview

The preview serves these paths once its workflow finishes. It shows the production look. FEATURE_NAVIGATION_PREVIEW=true mise run serve shows the design-system look.

reakaleek and others added 4 commits November 20, 2026 16:17
The API landing page listed every operation, which repeated the
sidebar and made the page long. It now lists each group once, with
its endpoint count and a two-line summary, in a two-column grid.

A group page shows its operations in one framed list. The method
sits in its own column, so the verbs line up. Long routes wrap at a
slash. The "On this page" list on API pages now uses the docs sizes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The landing tiles and group rows keep the deprecated strike from
main. A retired group's tile strikes its title, and a deprecated row
desaturates its method chip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oth pages

The group page now lists its intro headings, its extra sections and
Endpoints in the right rail, as the product landing page does. The
landing page shows its groups as two-column cards. Both pages share
one anchor and one list builder for Endpoints.

The On this page list also shows in the design system look, which
never built its Tailwind classes. Stacked title badges keep a gap.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 20, 2026 21:13
@reakaleek reakaleek added the redesign Frontend visual or structural redesign label Nov 20, 2026
@reakaleek
reakaleek requested a review from akira28 November 20, 2026 21:13
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

reakaleek and others added 7 commits November 20, 2026 22:24
…r review by @infra-vault-gh-plugin-prod)

The product landing card read the spec's tag description, so a
supplemental description showed on the group page but not on its
card. Both now use ApiMarkdownFrontMatter.TagSummary, which also
runs Prepare first.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…iew by @infra-vault-gh-plugin-prod)

The scroll spy follows every h2 and h3 in the page. A classification
heading has no On this page link, so once it reached the top the
Endpoints entry lost its active state. It is now a div with the
heading role, which keeps the outline and leaves the scroll spy alone.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ges (per review by @infra-vault-gh-plugin-prod)

The landing page and the group page each build On this page in a view
model. Two tests now snapshot its contents and order: headings down to
level 3, supplemental sections as level 3, then Endpoints. They also
check that an intro heading named Endpoints cannot take the page's id.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… an Endpoints section (per review by @infra-vault-gh-plugin-prod)

A supplemental section named Endpoints took the endpoints id, so the
On this page link for the endpoint list jumped to the section. Group
pages now reserve that anchor when they name their sections, and the
section becomes endpoints-2. Operation pages keep their own reserved
anchors.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… by @infra-vault-gh-plugin-prod)

A route that shorter variants share rendered like a required one, so
the longest route looked like the only one. An optional segment now
sits in brackets, as plain text with no colour or underline.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… by @infra-vault-gh-plugin-prod)

The column was a fixed 8.25rem, which a joined chip with three methods
outgrew and ran into the title. In the production look a two-method
chip already overflowed it by 6px, because the root font size is
smaller there. The column is now at least 8.75rem and grows to fit the
chip, so two-method rows stay aligned and a longer chip pushes only its
own row.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…(per review by @infra-vault-gh-plugin-prod)

The list had none of the data-toc hooks that the design system scroll
spy looks for, and its styles keyed on a class the spy never sets. The
partial now carries the hooks, and the active link takes the same
aria-current styles as the docs outline.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
reakaleek and others added 7 commits November 23, 2026 09:57
…@infra-vault-gh-plugin-prod)

A description that opens with a comment for authors made the comment
its first paragraph, so the group card and the meta description showed
it as text. Excerpt now drops HTML comments before it picks the first
paragraph.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…iew by @infra-vault-gh-plugin-prod)

A group page now reserves the endpoints fragment for its list of
operations. An extra Endpoints section moves to endpoints-2, so the
supplemental guide tells authors to update links to it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… (per review by @infra-vault-gh-plugin-prod)

With one optional segment the route has two variants, with and without
it, so the brackets are exact. With several, the variants need not
combine freely, and brackets on each would suggest routes the API does
not accept. Those rows now show the route as written.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ks (per review by @infra-vault-gh-plugin-prod)

The production bundle also initializes the design system scroll spy
for any data-toc list, so a production group page ran two spies with
different activation lines, and the link announced as current could
differ from the highlighted one. The partial now takes a model that
says which look it renders, and emits the hooks only for the design
system.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…t sign (per review by @infra-vault-gh-plugin-prod)

decodeURIComponent throws on a literal percent sign, as in a heading
called 100% coverage, and the error stopped the page's remaining
components from starting. The lookup now falls back to the raw
fragment, as the hash lookup in api-docs.ts already does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…per review by @infra-vault-gh-plugin-prod)

The method column grows to fit its chip, but a chip of four or more
methods leaves too little width for the title and the route beside
it. Such a row now stacks as it does on a phone: method, title, then
route. Rows with two or three methods stay side by side.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Comment thread docs/data/openapi/supplemental.md Resolved
reakaleek and others added 5 commits November 23, 2026 11:04
…ns (per review by @infra-vault-gh-plugin-prod)

The extra Endpoints section gets the first free suffix, which is
endpoints-2 only when no other section already owns it. The guide now
tells authors to check the rendered fragment.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…review by @infra-vault-gh-plugin-prod)

The first fix stripped every comment-shaped string, including one
written in a code span or a fence, which is visible text on the group
page. The pattern now matches code first and leaves it as written, so
only a real comment is dropped.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… by @infra-vault-gh-plugin-prod)

Stacking every row with four methods made one such operation in a
wide ledger fall out of line with its neighbours. The stack now
applies by container width: four or five methods below 700px, six or
more below 860px, sized from the chip width and the title and route
that must fit beside it. A wide ledger keeps these rows side by side.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r review by @infra-vault-gh-plugin-prod)

With one link in the fixture, the spy's fallback to the first link
passed the assertion even when the heading was never found. The
percent-sign heading is now the second entry, and the test checks it
is current and the first is not. It fails when the lookup finds
nothing, and when the decode throws.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Comment thread docs/data/openapi/supplemental.md Resolved
reakaleek and others added 4 commits November 23, 2026 11:20
The On this page list carried a design-system flag so that the
production bundle's document-wide initToc call would not bind it
alongside toc-nav.ts. The bundle is the right owner of that choice:
initToc now takes a selector, and the production call names the
operation page's section links. The list always carries its hooks, so
ApiTocModel, ApiViewModel.Toc and the Razor-time branch are gone, and
the two bundles share one fragment decoder.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A group page, its meta description and its landing card now read the
description from ApiMarkdownFrontMatter.TagDescription, so the supplemental
rule lives in one place. TagLandingViewModel looks its supplemental doc up
once. GroupCount had one caller and the endpoints anchor was named twice in
ReadIntroHeadings, so both are folded. Two test assertions guarded classes
that no longer exist, and the route tests share a render helper.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…omments

Four or five methods and six or more each had their own container query
with the same stacked grid. One rule at 860px covers both, and a row that
stacks a little earlier than strictly needed costs nothing. The comment
above the route still described a muted prefix and blue parameters that
were never built, two comments above the row said the same thing, and the
legacy TOC rule repeated a class the partial already sets.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
reakaleek and others added 6 commits November 23, 2026 11:42
…er review by @infra-vault-gh-plugin-prod)

An extra Endpoints section keeps endpoints-2 even when an intro heading
would take that slug, and the intro heading then loses its anchor and
its On this page entry. The guide now says so.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…(per review by @infra-vault-gh-plugin-prod)

An escaped backtick is not a code-span delimiter, so a comment between
two of them is a real comment and is hidden on the page. The code
pattern now skips a backtick that follows a backslash.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…review by @infra-vault-gh-plugin-prod)

The production call selected .api-section-links, a styling class, so a
CSS rename could silently turn off the current-section indicator. It
now uses the data-toc and data-toc-sticky attributes that carry the
behaviour.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ra-vault-gh-plugin-prod)

The selector test passed even if the production initializer dropped its
selector. The new test renders a group page with an On this page rail
and checks that initApiDocs leaves it unbound. It fails when the
selector is removed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r review by @infra-vault-gh-plugin-prod)

A selector such as .mine, .other had the not-bound filter on its last
branch only, so a second initToc call bound every .mine outline again.
The list is now wrapped in :is(), and a test checks that a second call
adds no listeners.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r review by @infra-vault-gh-plugin-prod)

AGENTS.md says views only iterate and print, so the group count, the
endpoint counts, the first route and the route text now come from view
model members and the @{ } blocks are gone. The Endpoints anchor, its
reserved set and its On this page entry move from shared infrastructure
into Landing as EndpointsSection, and ReadIntroHeadings and
ApiPostSection take the reserved set as a parameter, so the shared
layer no longer knows about group pages. Razor comments are shorter,
and two redundant tests are merged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
return string.Concat(text.AsSpan(0, endIndex + 1).Trim().TrimEnd('.'), "...");
}

[GeneratedRegex(@"(?<code>^(?<fence>```|~~~).*?^\k<fence>|(?<!\\)`[^`\n]+`)|<!--.*?-->", RegexOptions.Singleline

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

The new backtick check treats any preceding backslash as an escape. In CommonMark an even run of backslashes leaves the backtick active, so this can strip literal <!-- … --> text from a valid code span in a group-card summary even though the group page displays it. Check whether the backtick is actually escaped, and cover both odd and even runs in the regression test.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

@reakaleek
reakaleek merged commit 9c4d04f into main Nov 23, 2026
44 checks passed
@reakaleek
reakaleek deleted the api-group-landing-design-ad52c764 branch November 23, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redesign Frontend visual or structural redesign

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant