Repository navigation
Expand the API Topics sidebar heading by default - #4629
Merged
akira28 merged 2 commits intoOct 29, 2026
Merged
Conversation
The Topics heading now starts expanded on every page, not only on pages inside it. A sidebar group opts in through ISidebarExpandedNavigationItem: the sidebar templates render its toggle checked and its subtree open, and collapsing all folders on a section change leaves it open. Groups that do not opt in render byte-identical to before, and so does each sidebar's tree id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theletterf
approved these changes
Oct 28, 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.
The API Topics sidebar heading now starts expanded on every page, so the topic pages are visible without a click. A sidebar group opts in through a new marker interface; every other group renders exactly as before.
Affects: Site UI, API reference
Prompt summary: Expand the Topics heading of the API sidebar by default. The PR that adds the Topics heading, #4628, is already large, so this change comes as its own PR on top of it.
Stack: 2 of 2, on top of #4628. Merge #4628 first.
Why
A sidebar group only opens on pages inside it. On the product overview or an operation page, the Topics heading is collapsed, so readers do not see pages such as Authentication or Rate limiting unless they open it. There is no way for a group to start open.
What
Groups that start expanded
A navigation node that implements
ISidebarExpandedNavigationItemrenders with its toggle checked and its subtree open, in the default and the preview navigation. The API Topics heading is the only group that opts in.Unchanged output for every other group
The new attributes are written only for an expanded group, on the same line as the toggle's previous attribute. The flag also enters the sidebar content hash only when it is set. A collapsed group and the sidebar tree id are therefore byte-identical to
main.Client-side collapse
Changing to another section collapses every folder in the sidebar. A group marked
data-nav-default-opennow stays open through that reset.Verify
To confirm the flag-off site is unchanged:
cd src/Elastic.Documentation.Site npm run visual:seed npm run visual:checkCheck on the preview