Skip to content

Add page-aware API version switcher for API Explorer - #3831

Open
reakaleek wants to merge 4 commits into
mainfrom
issue-723-api-version-switcher
Open

Add page-aware API version switcher for API Explorer#3831
reakaleek wants to merge 4 commits into
mainfrom
issue-723-api-version-switcher

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Why

Multi-version API pages need a version switcher that links to the same operation in another major when it exists there. The interim native select only navigated to version landing pages and did not match the docs navigation dropdown pattern.

What

Replace the interim <select> with the same focus-within dropdown used in docs navigation. Build switcher targets from the version index and a cross-version page index so operation, tag, and schema pages deep-link across majors with landing-page fallback. Hide the product #nav-dropdown on API pages so only the version switcher appears in the left nav.

Closes elastic/docs-eng-team#723

Made with Cursor

reakaleek and others added 2 commits August 11, 2026 12:32
API Explorer pages need cross-version links to the same operation when it
exists, with landing-page fallback otherwise. Reuse the docs nav dropdown
pattern and hide the product nav dropdown on API pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply dotnet format fixes required by the pre-push lint hook.

Co-authored-by: Cursor <cursoragent@cursor.com>
@reakaleek

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

@reakaleek
reakaleek marked this pull request as ready for review August 17, 2026 10:52
@reakaleek
reakaleek requested review from a team as code owners August 17, 2026 10:52
@reakaleek
reakaleek requested a review from technige August 17, 2026 10:52
…licts

Co-authored-by: reakaleek <16325797+reakaleek@users.noreply.github.com>

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in c9d0fa9. The two conflicting files were:

  • IsolatedBuildNavigationHtmlWriter.cs — combined the suppressNavigationDropdown parameter from this PR with main's fix that sources top-level nav items from siteRoot (ensuring the dropdown lists all sections even when rendering a nested island).
  • ApiPagesNavRenderingTests.cs — dropped two unused using statements (Elastic.Documentation.Site.Navigation and Nullean.ScopedFileSystem) that this PR had added but main had removed.

Replace leftover FileSystemFactory call sites with DocumentationFileSystem.Resolve so the branch compiles after merging main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants