Skip to content

Rebuild docs top nav to match the marketing header#19133

Merged
cnunciato merged 1 commit into
masterfrom
jeffmerrick/docs-nav-match-marketing
May 19, 2026
Merged

Rebuild docs top nav to match the marketing header#19133
cnunciato merged 1 commit into
masterfrom
jeffmerrick/docs-nav-match-marketing

Conversation

@jeffmerrick
Copy link
Copy Markdown
Contributor

Updates the docs nav to match the marketing nav more closely. I also swapped in a different icon for docs (just prefer how it looks.)

Future work: implement same nav in registry and guides.
(pulumi/registry#10814 and https://github.com/pulumi/guides/issues/108)

Resolves #18834


Generated description of changes:

Replaces the legacy docs-top-nav.html with a data-driven implementation that
mirrors header/nav.html: Tailwind utility classes, the shared
github-star-button partial, and the same auth-aware Sign in / Dashboard
toggle (data-nav-loggedout / data-nav-dashboard).

  • Nav contents now live in data/docs_nav.yaml (logo dropdown, items, CTAs)
  • Logo dropdown handler moved out of packages.ts into header-nav.ts
  • Drops theme/src/scss/docs/_docs-top-nav.scss and the
    top-nav-user-toggle.html partial; both are superseded by the new markup
  • header_nav.yaml: books -> book-open for icon consistency
  • No-CLS auth swap in the header: added a pre-paint inline script in that reads the pulumi_web_user_info cookie and sets html.is-signed-in, paired with unlayered CSS rules that hide [data-nav-loggedout] and reveal [data-nav-dashboard]. Replaces the post-hydration JS toggle in header-nav.ts, so the Sign in → Dashboard swap happens before first paint and contributes nothing to CLS for logged-in users

Notes:

  • The docs nav intentionally does not stick to the top of the viewport and
    does not ship a mobile hamburger sheet -- below lg, the docs sidebar is
    the primary nav surface.

Replaces the legacy docs-top-nav.html with a data-driven implementation
that mirrors header/nav.html: Tailwind utility classes, the shared
github-star-button partial, and CSS-only auth-aware Sign in / Dashboard
swap.

- Nav contents now live in data/docs_nav.yaml (logo dropdown, items, CTAs)
- Logo dropdown handler moved out of packages.ts into header-nav.ts
- Drops theme/src/scss/docs/_docs-top-nav.scss and the
  top-nav-user-toggle.html partial; both are superseded by the new markup
- header_nav.yaml: books -> book-open for icon consistency
- Pre-paint inline script in head.html sets <html class="is-signed-in">
  from the pulumi_web_user_info cookie, with unlayered CSS rules driving
  the [data-nav-loggedout]/[data-nav-dashboard] swap. Replaces the
  post-hydration JS toggle so the swap happens before first paint and
  contributes nothing to CLS for signed-in users.

The docs nav intentionally does not stick to the top of the viewport and
does not ship a mobile hamburger sheet -- below lg, the docs sidebar is
the primary nav surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jeffmerrick jeffmerrick marked this pull request as ready for review May 18, 2026 20:40
@github-actions github-actions Bot added review:triaging Claude Triage is currently classifying the PR domain:infra PR touches workflows, scripts, infra, Makefile, or build config review:in-progress Claude review is currently running and removed review:triaging Claude Triage is currently classifying the PR labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pre-merge Review — Last updated 2026-05-18T20:42:25Z

Tip

Summary: Infrastructure refactor that rebuilds the docs top-nav partial (layouts/partials/docs-top-nav.html) to mirror the marketing-header pattern in layouts/partials/header/nav.html: nav contents move into a new data/docs_nav.yaml, the logo-dropdown handler moves from packages.ts into header-nav.ts, and the auth-aware Sign-in/Dashboard swap is driven CSS-only via an is-signed-in class set pre-paint by an inline script in head.html. Deletes theme/src/scss/docs/_docs-top-nav.scss and layouts/partials/top-nav-user-toggle.html; renames header_nav.yaml Documentation icon booksbook-open for consistency with the new data file. Reader-blocking wrongness would be a broken template render (Hugo build failure), a dangling reference to the deleted partial/SCSS, mis-wired data-nav-loggedout/data-nav-dashboard attributes that show both Sign-in and Dashboard at once, or a data-logo-nav-* selector mismatch that breaks the logo menu. Passes that ran: external claim verification (4 URL-href claims — 2 verified, 2 routed not-a-claim), Vale prose lint, code-execution / editorial-balance / cross-sibling skipped as N/A; Hugo build is deferred to build-and-deploy.yml (the pre-step's "content-only PR" skip reason misfired here since templates were touched — flagging as a confidence gap rather than a finding).

Review confidence:

Dimension Level Notes
mechanics MEDIUM Hugo build was skipped by the pre-step (reported as "content-only PR; templating paths untouched") even though template/partial/SCSS files changed. Render correctness will be validated by build-and-deploy.yml, not this review. Manual grep confirmed no remaining references to the deleted top-nav-user-toggle.html partial or _docs-top-nav.scss import, and data-logo-nav-trigger / data-logo-nav-menu / data-nav-loggedout / data-nav-dashboard / is-signed-in are consistently wired across the new partial, header-nav.ts, head.html, and main.scss.
facts HIGH
Investigation log
  • Cross-sibling reads: not run (not in a templated section)
  • External claim verification: 2 of 4 claims verified (0 unverifiable, 0 contradicted) · 4 specialists (numerical, cross-reference, capability, framing); 0 cross-specialist corroborations · routed: 0 inline, 4 Pass 1, 0 Pass 2, 0 Pass 3.
  • Cited-claim spot-checks: not run (no cited claims)
  • Frontmatter sweep: not run (no frontmatter in diff)
  • Temporal-trigger sweep: ran (recency words present in diff; spot-check in-review)
  • Code execution: not run (no static/programs/ change)
  • Code-examples checks: not run (no fenced code blocks in content files)
  • Editorial-balance pass: not run (not under content/blog/)
🚨 Outstanding ⚠️ Low-confidence 💡 Pre-existing ✅ Resolved
0 0 0 0

🔍 Verification trail

4 claims extracted · 2 verified · 0 unverifiable · 0 contradicted
  • L22 in data/docs_nav.yaml "href: /product/neo/" → ➖ not-a-claim (evidence: The entry href: /product/neo/ exists in data/docs_nav.yaml at the "Pulumi Neo" nav item. This is a URL path segment in a navigation config file — a path reference, not a falsifiable factual assertion.; source: repo:data/docs_nav.yaml)
  • L28 in data/docs_nav.yaml "href: https://slack.pulumi.com/" → ✅ verified (evidence: The file data/docs_nav.yaml at the Slack nav entry contains exactly href: https://slack.pulumi.com/, matching the claimed URL.; source: repo:data/docs_nav.yaml)
  • L38-39 in data/docs_nav.yaml "signIn: { label: Sign in, href: https://app.pulumi.com/signin, track: header-console }" → ➖ not-a-claim (evidence: This is a navigation configuration entry specifying a URL (https://app.pulumi.com/signin) and label for a "Sign in" link. It is a site configuration value (a URL reference in a nav YAML), not a falsifiable factual assertion about the wor…; source: data/docs_nav.yaml L38-39)
  • L42 in data/docs_nav.yaml "href: /docs/get-started/" → ✅ verified (evidence: The file data/docs_nav.yaml contains href: /docs/get-started/ under the getStarted CTA block: getStarted: label: Get started href: /docs/get-started/ track: get-started-practitioner-nav.; source: repo:data/docs_nav.yaml)

🚨 Outstanding in this PR

No outstanding findings in this PR.

⚠️ Low-confidence

No low-confidence findings.

💡 Pre-existing issues in touched files (optional)

No pre-existing issues in touched files.

✅ Resolved since last review

No items resolved since the last review.

📜 Review history

  • 2026-05-18T20:42:25Z — No blockers; 4 nav-href claims verified or routed not-a-claim, 0 Vale findings, wiring of the auth-swap/logo-dropdown attributes and deleted-file references manually verified consistent. Hugo build deferred to build-and-deploy.yml. (9b9fccf)

Need a re-review? Want to dispute a finding? Mention @claude and include #update-review.
(For ad-hoc questions or fixes, just @claude — no hashtag.)

@github-actions github-actions Bot added review:no-blockers Claude review completed cleanly; outstanding is empty and removed review:in-progress Claude review is currently running labels May 18, 2026
@jeffmerrick
Copy link
Copy Markdown
Contributor Author

@jeffmerrick jeffmerrick requested review from CamSoper and cnunciato May 18, 2026 20:51
Copy link
Copy Markdown
Contributor

@CamSoper CamSoper left a comment

Choose a reason for hiding this comment

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

This looks great to me, @jeffmerrick!

@cnunciato
Copy link
Copy Markdown
Contributor

Hopefully not jumping the gun here, but would love to see this out, so clicking the button! 🚀🚀🚀

@cnunciato cnunciato merged commit 042414b into master May 19, 2026
12 checks passed
@cnunciato cnunciato deleted the jeffmerrick/docs-nav-match-marketing branch May 19, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain:infra PR touches workflows, scripts, infra, Makefile, or build config review:no-blockers Claude review completed cleanly; outstanding is empty

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Website header: reflect signed-in state in 'Sign In' control

3 participants