Repository navigation
Open the API sidebar with an Overview row and drop the Topics group - #4981
Merged
Merged
Conversation
The API sidebar copied Bump.sh's Topics heading, and it had no row that led back to the API overview. The product switcher was meant to, but assembler builds hide it. The sidebar now opens with an Overview row, then the guide pages (Authentication, Rate limiting, children: pages, x-topics) as plain rows with the same spacing as the rows inside a group. The sidebar-expanded marker lost its only user, so its plumbing goes too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4981/ Sample changed pages: |
…nfra-vault-gh-plugin-prod) `api-docs.css` loads on every page, so the 16px rule also tightened the top-level rows of every docs sidebar. The tree list now carries `nav-tree--overview-row` only when it opens with an Overview row, and the rule targets that class. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y @infra-vault-gh-plugin-prod) Tag and operation pages of a spec with several `x-tagGroups` render the sidebar of their own group, which had no link back to the API landing page once primary nav is on. That group tree now carries the same marker as the API landing, so it opens with the Overview row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ew by @infra-vault-gh-plugin-prod) With primary nav off, a group's sidebar used to open with a row titled after the group. The Overview row replaced that row, so readers lost which group the sidebar shows. The group now follows the Overview row as the same heading it is in the full API sidebar. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eview by @infra-vault-gh-plugin-prod) The render-model flag alone would pass if the template dropped the class. The generated landing page now has to carry it on its tree list. The Markdown side is already locked: a class on every tree fails the LegacyHeadingRow_RendersTitleWithoutAnEmptyLink snapshot. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y @infra-vault-gh-plugin-prod) The API sidebar opens with an Overview row to the landing page, so a child page with the same navigation title shows as a second Overview row that leads elsewhere. The build now warns on that page and asks for a title that names what it covers. The row label is one constant, so the check and the row cannot drift apart. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… by @infra-vault-gh-plugin-prod) A children: page takes its sidebar label from navigation_title, or else from its file name, so a new heading does not clear the warning. The message and the docs now ask for navigation_title, which keeps the URL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…per review by @infra-vault-gh-plugin-prod) A group and a tag with the same name got the same short id, so the tag's chevron toggled the group checkbox and collapsed the whole group. The group id now carries its own prefix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ra-vault-gh-plugin-prod) A group's sidebar built its rows with CreateNavigationItems, then threw them away and built them again through CreateNode. Overview-row trees now take their own branch and build their rows once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…@infra-vault-gh-plugin-prod) ShortId joins its arguments before hashing, so a tag named after the prefix plus the group name still produced the group's id. The prefix now sits on the generated id, and tag ids are eight hex characters, so no tag name can reach a group's id. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 sidebar now opens with an Overview row that links to the API landing page, followed by Authentication, Rate limiting and the other guide pages as plain rows. The Bump.sh-style Topics heading is gone.
Affects: API reference, Site UI
Prompt summary: The API navigation copies Bump.sh's Topics group, and readers have no easy way back to an API's landing page. The ask is to find a fix for both, compare it with the alternatives, and build the chosen option.
Why
On an API page, nothing in the sidebar leads to the API's landing page. The product switcher was supposed to, but assembler builds hide it, so production has no link at all. The guide pages sat under a Topics label copied from Bump.sh. No other part of the docs site uses that label.
What
An Overview row at the top of the API sidebar
The navigation render model adds an Overview row in line with the first pages, and puts no rule under it. The row comes from the existing island overview row, so it renders the same whatever the primary-nav flag is set to.
ISidebarWithoutRootIndexNavigationItembecomesISidebarOverviewRowNavigationItem. The API landing carries it, and so does eachx-tagGroupsgroup, whose pages render that group as their sidebar. There the group follows the Overview row as the same heading it is in the full API sidebar. Docs sidebars do not carry it and do not change.Guide pages as plain rows
Authentication, Rate limiting, the docset's
children:pages and the spec'sx-topicsnow hang from the API landing, with no heading above them. They keep their order: Authentication first, Rate limiting second, thenchildren:pages as declared, then topics by title. The build warns about achildren:page whose navigation title isOverview, because it would show as a second Overview row. The rows use the same 16px spacing as the rows inside a group, through a class that only trees with an Overview row get. The larger gap stays above the OPERATIONS label.Dead code removed
Nothing used the
ISidebarExpandedNavigationItemmarker after the Topics heading went. It is removed, together with theExpandedflag, its template branches and thedata-nav-default-openhandling inpages-nav.ts. The landing page also computed a topics list it never rendered, and that is gone too.Out of scope: On a deep operation page, the sidebar scrolls to the current row, so the Overview row is above the fold. A link to the overview in the fixed sidebar header would cover that case, and can follow separately.
Verify
Check on the preview
🤖 Generated with Claude Code