Skip to content

Replace tabbed mobile menu with dedicated Contents trigger - #167

Open
williamw wants to merge 2 commits into
mainfrom
mobile-nav
Open

Replace tabbed mobile menu with dedicated Contents trigger#167
williamw wants to merge 2 commits into
mainfrom
mobile-nav

Conversation

@williamw

@williamw williamw commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Replaces the tabbed mobile handbook navigation added in #158 with a dedicated, always-visible "Contents" trigger on doc pages, so the marketing hamburger menu goes back to marketing-only content.

https://linear.app/modularml/issue/DESN-1629/llm-handbooks-mobile-menu-doesnt-show-sidebar-links

  • Replaces the mobile flyout's tabbed Inference Handbook/Modular.com navigation with a dedicated "Contents" trigger and full-screen handbook nav overlay on doc pages
  • Restores the marketing hamburger menu to marketing-only content
  • Aligns the new sub-bar with the header's edges and tightens breadcrumb/TOC spacing on mobile doc pages
  • Morphs the hamburger icon into an X on open instead of showing "menu"/"close" text
  • Adds "LLM Inference Handbook" to the Resources nav menu

…tents trigger

The mobile flyout previously overloaded the marketing hamburger with a
second "Inference Handbook" tab. Split that back out into its own
always-visible sub-bar on doc pages instead, so the marketing menu goes
back to marketing-only content and the handbook nav gets a dedicated
"Contents" trigger with a full-screen overlay.

- Revert MarketingHeader/MarketingHeaderHost to marketing-only, removing
  the tab state, segmented control, and HandbookNavTree usage
- Add DocsContentsNav: a sticky sub-bar (static label + Contents button)
  rendered above DocBreadcrumbs on every doc page, opening a full-screen
  overlay that reuses HandbookNavTree for the live sidebar tree
- Move HandbookNavTree's CSS out of the header's Shadow-DOM-only
  stylesheet into its own global stylesheet, since it now renders in
  the regular light DOM
- Portal the Contents overlay to document.body so its z-index isn't
  trapped inside the sub-bar's own sticky stacking context
- Break the sub-bar out of the doc container's centered max-width via
  the standard viewport-relative technique, so it spans full width and
  aligns with the header's logo/menu button at every breakpoint
- Tighten breadcrumb/TOC-dropdown spacing on mobile doc pages to match
  the sub-bar's own rhythm
- Morph the marketing hamburger's lines into an X on open instead of
  swapping in "menu"/"close" text labels
- Add "LLM Inference Handbook" to the Resources nav menu
@williamw williamw self-assigned this Jul 8, 2026
@williamw
williamw requested review from scottamain and serenackuo July 8, 2026 16:54
The sidebar's top-level "Welcome" link had its own distinct treatment
(larger font, bold, bottom hairline, extra margin) left over from when
it was a longer page title ("LLM Inference Handbook"). Now that it's a
short link, that treatment read as an unintentional visual outlier
instead of part of the sidebar tree.

- Removes the hairline border, oversized font, and extra margin on
  desktop so "Welcome" sits flush with the rest of the sidebar
- Matches its font-weight to the bold top-level category labels
  (Foundations, Planning your deployment, etc.)
- Restyles the mobile Contents overlay's equivalent link to match its
  category headers' uppercase/bold treatment and spacing exactly

@scottamain scottamain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I’d prefer to follow the pattern used by the current Bento handbook site, https://bentoml.com/llm/. The hamburger defaults to the Handbook menu and has a "Back to main menu" link that then shows the product nav.

Image

@scottamain scottamain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I’d like to discuss this further before we merge. I’m concerned this is one too many menus in mobile. It creates 3 menus: one for the product nav, one for the docs nav, and one for the page table of contents (for which the new "Contents" menu can be easily confused).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants