Header: hover-open dropdowns, per-item underline, Model dropdown#1059
Merged
Conversation
Reworks the desktop nav to feel more responsive and to expose Model sections directly instead of bouncing through the model overview. Behaviour - Dropdowns (About, Model) open on hover with a 100ms intent delay and close on a 200ms grace delay; a transparent paddingTop "bridge" inside the same hover container fills the 10px visual gap so the cursor doesn't trigger close while travelling to the panel. Click toggles still work for touch/keyboard, and Escape + outside-click close as before. - Each nav item now gets a center-out underline-grow on hover. The active page (or any of its children, for dropdown triggers) keeps the underline lit, so the bar always shows where you are. - Focus produces the same affordance as hover so keyboard users get the same feedback. Model dropdown - Was a single flat link to /model. Now expands into a sidebar-mirror: Rules (Coverage, Parameters, Variables), Data (Pipeline, Calibration, Validation), Behavioral responses. Children are indented one level. Parents (Rules, Data, Behavioral) are clickable to their overview pages — these are real pages as of PolicyEngine/policyengine-model#41. All Model links use <a> via a new `external` flag on DropdownItem so the Vercel multizone rewrite is hit instead of a client-side route that the website zone can't fulfil. Mobile - MobileMenu now walks the nested children too and honors `external` so Model sub-pages route correctly on touch devices. Small things - Logo→nav gap bumped from 12px to 40px so the logo reads as an anchor instead of another menu entry. - Per-property transition delays on dropdown rows: the cascading entrance reveal staggers `opacity` only, while hover background/color stay instant — fixes the lag when sweeping the cursor across rows in an open dropdown. - CountrySelector hover inlined after removing the shared hoverHandlers helper (it no longer fit the underline pattern). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PavelMakarchuk
added a commit
to PolicyEngine/policyengine-model
that referenced
this pull request
May 26, 2026
…pdown) (#42) Mirrors the website header changes (PolicyEngine/policyengine-app-v2#1059) so users see consistent navigation across zones. - Dropdowns open on hover with a 100ms intent delay and a 200ms close grace; a transparent paddingTop "bridge" inside the same hover container fills the 10px gap so the cursor doesn't trigger close while travelling to the panel. Click toggles, Escape, and outside-click still work for touch / keyboard. - Per-item center-out underline grow on hover. The active page (or any child of a dropdown trigger) keeps the underline lit so the bar shows where you are. Active-state walks dropdown children recursively so visiting /us/model/rules/coverage lights up Model. - Model is now a dropdown with the full sidebar mirror: Rules (Coverage / Parameters / Variables), Data (Pipeline / Calibration / Validation), Behavioral responses. Children are indented one level. - Per-property transition delays on dropdown rows: the cascading entry reveal staggers opacity only; hover background/color stay instant. - Logo→nav gap bumped from spacing.md (12px) to 40px so the logo reads as an anchor instead of another menu entry. - MobileMenu now walks nested children too and indents them. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PavelMakarchuk
added a commit
to PolicyEngine/household-api-docs
that referenced
this pull request
May 26, 2026
…pdown) (#21) Mirrors the website header changes (PolicyEngine/policyengine-app-v2#1059) so users see consistent navigation across zones. - Dropdowns open on hover with a 100ms intent delay and a 200ms close grace; a transparent paddingTop "bridge" inside the same hover container fills the 10px gap so the cursor doesn't trigger close while travelling to the panel. Click toggles, Escape, and outside-click still work for touch / keyboard. - Per-item center-out underline grow on hover. The active page (or any child of a dropdown trigger) keeps the underline lit so the bar shows where you are. Active-state walks dropdown children recursively. - Model is now a dropdown with the full sidebar mirror: Rules (Coverage / Parameters / Variables), Data (Pipeline / Calibration / Validation), Behavioral responses. Children are indented one level. - Per-property transition delays on dropdown rows: the cascading entry reveal staggers opacity only; hover background/color stay instant. - Logo→nav gap bumped from spacing.md (12px) to 40px so the logo reads as an anchor instead of another menu entry. - MobileMenu now walks nested children too and indents them. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
PavelMakarchuk
added a commit
that referenced
this pull request
Jun 5, 2026
* Align calculator header with main website header 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> * Remove HomeHeader from the website-migration guard 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> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworks the desktop header to feel more responsive and to expose Model sections directly instead of bouncing users through the model overview.
Behaviour
paddingTop"bridge" inside the same hover container fills the 10px visual gap between trigger and panel, so the cursor doesn't trigger close while travelling to the panel.transform: scaleX(0→1)). The active page — or any child of a dropdown trigger — keeps the underline lit, so the bar always shows where you are.Model dropdown
Model → /modellink expands into a sidebar mirror:<a>via a newexternalflag onDropdownItemso the Vercel multizone rewrite is hit instead of a client-side route that the website zone can't fulfil.Mobile
MobileMenunow walks the nested children too and honorsexternal, so Model sub-pages route correctly on touch devices.Small things
opacityonly, while hover background/color stay instant. Fixes the visible lag when sweeping the cursor across rows of an open dropdown.CountrySelectorhover inlined after removing the sharedhoverHandlershelper (it no longer fit the underline pattern).Test plan
/us/research→ Research underline stays lit/us/model/rules/coverage→ Model underline stays lit (active state walks dropdown children)🤖 Generated with Claude Code