Skip to content

Remove the table of contents from API type pages - #5037

Merged
reakaleek merged 3 commits into
mainfrom
remove-type-page-toc-c1314615
Nov 24, 2026
Merged

reakaleek merged 3 commits into
mainfrom
remove-type-page-toc-c1314615

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

API type pages, such as QueryContainer, no longer show the "On this page" table of contents in the right rail.

Affects: API Explorer

Prompt summary: Remove the table of contents from API type pages like /docs/api/elasticsearch/types/_types-query_dsl-querycontainer.

Why

A type page lists every property in the right rail. On large types such as QueryContainer, that list is long and repeats the property list already shown in the page body.

What

Type page rail

The type page no longer puts a table of contents in the right rail. The rail column stays in place, so the content keeps the same width and left edge as operation pages. Copy page still shows.

Table of contents builder

SchemaViewModel no longer builds a list of headings, so the page exposes none. Operation, landing, topic and structural pages keep theirs.

Guidance and test

src/Elastic.ApiExplorer/AGENTS.md no longer tells authors to add "On this page" to schema pages. SchemaPage_RendersNoOnThisPageList renders the Query type page through the layout and asserts it has no "On this page" list and still shows Copy page.

Verify

dotnet test --project tests/Elastic.ApiExplorer.Tests

Check on the preview

🤖 Generated with Claude Code

Type pages such as `QueryContainer` listed every property in the right rail, which added noise without helping navigation.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 24, 2026 15:12
@reakaleek
reakaleek requested a review from Mpdreamz November 24, 2026 15:12
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

reakaleek and others added 2 commits November 24, 2026 16:26

var html = await fixture.RenderAsync(item);

html.Should().Contain("Copy page");

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)

This assertion fails with FEATURE_NAVIGATION_PREVIEW=true even when the schema page correctly has no TOC. The preview layout renders “View as Markdown” instead of the legacy “Copy page” button. Assert the appropriate page action for each layout, or explicitly isolate this test to the legacy layout.

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

@reakaleek
reakaleek merged commit 4bd5cba into main Nov 24, 2026
44 checks passed
@reakaleek
reakaleek deleted the remove-type-page-toc-c1314615 branch November 24, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants