Skip to content

Polish Nav V2 sidebar chrome and API method badges - #3846

Open
itsalexcm wants to merge 10 commits into
findability/alexcerezofrom
experiment/nav-fixes
Open

Polish Nav V2 sidebar chrome and API method badges#3846
itsalexcm wants to merge 10 commits into
findability/alexcerezofrom
experiment/nav-fixes

Conversation

@itsalexcm

@itsalexcm itsalexcm commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Why

This PR tightens Nav V2 sidebar polish so the panel feels intentional under both isolated serve and the assembler elastic-nav shell: fewer layout gaps, clearer sticky chrome, reliable “you are here” highlighting, and API rows that match the same visual language.

Design / UX improvements (in this PR)

Use this list in review — everything below is intentional and should be noticeable in :3000 (isolated) and :4000 (assembler).

Layout & sticky chrome

  • Sidebar fills the viewport without a dead gap at the bottom (aside padding + #pages-nav height flex fix)
  • Assembler sticky offset accounts for secondary nav under the static Elastic header (no double-counting the full shell)
  • Scroll-up / scroll-down controls sit under Search / Back chrome (top: 8px), pinned to the menu host rather than floating oddly in the tree

Search & Back (island chrome)

  • Search sticky block: 16px padding + light bottom border (#e3e8f2) so it reads as chrome, not part of the tree
  • Back control matches scroll-button colors and nav-item geometry (min-height: 32px, inline padding, 8px radius)
  • Search input height nudged to ~32px (vertical padding 5px) so it aligns with Back / row rhythm

Labels, hierarchy & active state

  • Nested labels: first label keeps tighter top padding; sibling nested labels get extra top spacing (24px) so section breaks breathe
  • Open ancestors use muted ink (#516381) for text (chevron stays neutral)
  • Current / expanded matching works when hrefs contain dotted segments (/./…) — e.g. Extend → Kibana deep pages stay highlighted after load and hx-boost
  • Shared “sidebar heading” marker so docs label: nodes and API tag-group headings render the same non-clickable heading chrome

API sidebar

  • Single-operation rows show an HTTP method badge (GET / POST / …)
  • Multi-operation rows show a neutral multi-method (grid) badge instead of a misleading single method

Explicitly not in this PR

Call these out so reviewers don’t hunt for them:

  • Island “Overview” row for index.md landings (overview is still the island landing URL, but not listed as a .current tree row)
  • Sidebar performance / lazy TOC work (large assembler nav HTML cost) — deferred on purpose
  • Content / IA YAML quirks (e.g. label: ─── separators, nested labels under clickable groups in deploy-manage) — those come from navigation-v2.yml, not CSS bugs
  • Broader Nav V2 IA or section restructuring — this branch only polishes chrome on top of findability/alexcerezo

Test plan

  • Isolated serve (FEATURE_NAV_V2=true, :3000): no bottom gap; Search/Back borders align; scroll buttons under chrome
  • Assembler preview (:4000): same chrome under elastic-nav; sticky offset tracks secondary nav only
  • Deep page under Extend/Kibana: ancestors + current row highlight (including /./ URLs)
  • Enter an island: Back chrome matches Search; leave/re-enter via hx-boost without losing highlight
  • API docs sidebar: single-method + multi-op badges look correct next to titles

itsalexcm and others added 6 commits August 12, 2026 15:17
Keeps the tree building on SDKs that do not yet support the with-expression
collection initializer form used elsewhere in the repo.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes viewport gaps under the elastic-nav shell, scroll/search/back chrome,
label spacing, and current-page matching for dotted relative URLs so islands
like Extend stay highlighted after rebuild and hx-boost.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Surfaces single-method glyphs and a multi-operation badge in the API sidebar
so operation rows match the rest of the Nav V2 chrome.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
CI treats IDE0028 as errors, so collection expressions must keep the
with-comparer form. Also remove the unused size binding that failed ESLint.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@itsalexcm
itsalexcm force-pushed the experiment/nav-fixes branch from 0b4e9ed to db22982 Compare August 12, 2026 13:19
dotnet format had added parameterless RequiresDynamicCode/RequiresUnreferencedCode
attributes that do not compile on the current SDK.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore Nav V2 HTMX segment helpers on URL strategies, wire NavigationViewModel
into nav render tests, fix hub/whats-new product links, and update synthetics
for the Nav V2 get-started IA.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Align assembler link tests with body-boost, restore nav render cache
identity, register hub syntax pages in the docset TOC, and set
hx-swap=none with select-oob so Nav V2 sidebar navigation updates content.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Quoted hx-* attributes were HTML-encoded by Razor to &quot;, so sidebar
clicks pushed the URL without swapping content. Keep values unquoted,
add hx-swap=none, and list testing/products pages in the docset TOC.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant