Skip to content

Mount Jump to API in the assembler API sidebar - #4145

Open
reakaleek wants to merge 1 commit into
feat/nav-search-type-attributefrom
feat/mount-jump-to-page-api
Open

reakaleek wants to merge 1 commit into
feat/nav-search-type-attributefrom
feat/mount-jump-to-page-api

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Assembler API pages now show a Jump to API box in the sidebar. Isolated, air-gapped, and Markdown docs layouts still omit it.

Affects: API reference, Site UI

Prompt summary: Third stacked PR for the Jump to page API story. Implement elastic/docs-eng-team#859 on top of elastic/docs-builder#4144: register the custom element, mount it on assembler API pages, and keep docs and air-gapped layouts clear.

Stack: 3 of 5, on top of #4144.

Why

The Jump to page custom element is defined and unused. API pages need the box in the sidebar. Markdown docs pages must not get it back.

Closes elastic/docs-eng-team#859

What

API sidebar

Assembler builds that are not air-gapped render <navigation-search type=\"api\" placeholder=\"Jump to API\"> in the sticky block of _ApiPagesNav. Isolated and air-gapped layouts omit the element.

Loader

loadWebComponents registers navigation-search so the host on /docs/api/... pages hydrates.

Docs

api-explorer.md states that assembler API pages show the box and that isolated, air-gapped, and Markdown docs pages do not.

Verify

dotnet test tests/Elastic.ApiExplorer.Tests/
# Render_ShowsJumpToPageOnAssemblerBuilds
# Render_OmitsJumpToPageOnIsolatedBuilds
# Render_OmitsJumpToPageWhenAirGapped
dotnet test tests/Navigation.Tests/
# TocTree_RendersFigmaShellWithoutNavV2Hook

Out of scope: API-shaped result rows and leftover cleanup. Those land in the next PRs.

Made with Cursor

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — I found no actionable issues in this PR.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

API reference pages need the box. Markdown docs, isolated builds, and air-gapped layouts must not get it.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4145/

Sample changed pages:

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output.

Review the workflow run logs for details.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@(Model.Features.NavigationPreviewEnabled ? "hx-preserve" : "")
class="sidebar-nav h-full simple-scrollbar">
@if (Model.HubSwitcherItems.Count > 0)
@{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NITPICK] Avoid @{ } decision block in Razor views

src/Elastic.ApiExplorer/AGENTS.md asks views to avoid @{ } decision blocks and keep branching inline on precomputed fields. This local variable can be inlined directly in the @if condition to stay consistent with that convention and keep view logic purely declarative.

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.

1 participant