Repository navigation
Expand API operation sections by default - #4636
Merged
Merged
Conversation
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4636/ Sample changed pages: |
akira28
force-pushed
the
feature/api-explorer-expand-collapsible
branch
2 times, most recently
from
November 4, 2026 07:58
9594ece to
87f7141
Compare
akira28
enabled stacked auto-merge (squash)
November 4, 2026 07:58
Parameters, request body, authentication and required authorization now render open on load, and readers can still fold each one. Readers no longer open every section by hand to see what an endpoint accepts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each response status now opens on load like the other operation sections. Opening one no longer closes the others, which would otherwise collapse the rest on the first click. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Object and map rows now open their fields on load, with the toggle reading "hide properties". Readers see nested fields without a click and can still fold them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The section and response tests only checked the wrapper class, so a restored hidden body would still pass. They now check that the body has no hidden attribute and that the toggle reports aria-expanded true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
akira28
force-pushed
the
feature/api-explorer-expand-collapsible
branch
from
November 4, 2026 11:52
87f7141 to
d2107d8
Compare
reakaleek
approved these changes
Nov 4, 2026
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.
API operation pages now open their parameters, request body, authentication, required authorization and response sections on load, along with the show properties toggles on nested fields. Readers can still fold each one.
Affects: API reference, Site UI
Prompt summary: Render every collapsible section on API reference pages expanded when the page loads, and keep each one collapsible. The Docs Eng Weekly meeting on 29 October 2026 decided this, so the pages read as complete as the Bump.sh pages they replace.
Why
Operation pages fold every section by default. Readers open each one by hand to see what an endpoint accepts or returns, and find-in-page cannot reach folded content in some browsers.
What
Sections start expanded
The parameter, request body, authentication and required authorization sections share one wrapper and header, so
ParamSectionHeadernow emits theexpandedclass, an open body andaria-expanded="true". This applies to every product the API Explorer renders.Responses start expanded
Each response status panel renders open in
_ResponsesBlock.cshtml. Responses used to act as an accordion, where opening one closed the others. With every panel open, that rule would collapse the rest on the first click, soapi-docs.tsno longer closes the others. Opening a response still moves the examples rail to the same status code.Nested properties start expanded
Object and map rows open their fields on load, and the toggle reads "hide properties".
ComputeDefaultExpandedinApiPropertyTreeBuilder.csnow returnstrue. A recursive reference still renders as a link, so the tree stays finite, but pages with deep schemas get longer.Folding still works
The bodies no longer carry
hidden="until-found"on load. The existing disclosure script flips the classes and the attribute when a reader folds a section.Docs and tests
api-explorer.mdsays the sections are expanded by default. The rendering assertions and the response tests follow the new behaviour.Out of scope: Find-in-page for a section a reader has folded is still tracked in elastic/docs-eng-team#1040.
Verify
Check on the preview
IndexSettingsfields, so the page is shorter than the upstream schema.Closes elastic/docs-eng-team#1149
🤖 Generated with Claude Code