Skip to content

Align calculator header with main website header#1066

Merged
PavelMakarchuk merged 2 commits into
mainfrom
fix/reports-header-alignment
Jun 5, 2026
Merged

Align calculator header with main website header#1066
PavelMakarchuk merged 2 commits into
mainfrom
fix/reports-header-alignment

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Contributor

Summary

Changes

  • app/src/components/homeHeader/NavItem.tsx — hover-open dropdowns (100ms open / 200ms close), per-item underline with active-page detection via useAppPathname, nested children support, Apple-style dropdown panel matching the website.
  • app/src/components/shared/HomeHeader.tsx — add Model dropdown (Rules / Data / Behavioral responses with sub-items), Python nav item, Events under About.
  • app/src/components/homeHeader/MobileMenu.tsx — render nested children items indented under their parent.
  • changelog_entry.yaml — entry added.

Test plan

  • make typecheck ✅ (verified locally)
  • cd calculator-app && bun run typecheck ✅ (verified locally)
  • cd app && bun run lint ✅ (verified locally)
  • All 53 header-related unit tests pass ✅ (verified locally)
  • Visual check on https://app.policyengine.org/us/reports preview deploy — header matches https://policyengine.org/us
  • Hover-open dropdowns work; Model dropdown shows Rules/Data sub-items; cross-zone links (Model, API, Python) navigate via <a> (full page load) to the website zone.
  • Mobile menu shows nested children.

🤖 Generated with Claude Code

The calculator-app shell (/us/reports etc.) still rendered through
StandardLayout → HomeHeader, which kept the pre-#1059 design (click-open
dropdowns, no per-item underline, missing Model/Python/Events). Update
NavItem to mirror the website Header (hover-open, underline with active
detection, nested children), expand the navItems in HomeHeader to match,
and teach MobileMenu to render nested children.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Jun 5, 2026 8:08pm
policyengine-calculator Ready Ready Preview, Comment Jun 5, 2026 8:08pm
policyengine-calculator-next Ready Ready Preview, Comment Jun 5, 2026 8:08pm
policyengine-website Ready Ready Preview, Comment Jun 5, 2026 8:08pm

Request Review

These files were ported to website/src/components/Header.tsx, but the
calculator-app still renders the legacy HomeHeader via StandardLayout, so
they have to stay editable in app/. Drop the matching entries from the
PR guard and document the situation in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant