Skip to content

"Posts" nav dropdown ships as dead code in production (devOnly child only) #1866

Description

@davidsneighbour

Current behaviour

The "Posts" nav item's dropdown machinery (caret button, aria-haspopup="menu", the role="menu" panel, --popover tint/positioning) never renders on a production build. Its only child (Drafts) is devOnly: true in src/data/topnavigation.json, and Header.astro's filter (value.children?.filter((child) => import.meta.env.DEV || !child.devOnly)) strips it out in production, so subItems.length becomes 0 and NavItem.astro's hasSubItems is always false for real visitors.

Why it matters

DESIGN.md documents an entire "Sticky Header & Popover Chrome" contract for this dropdown (positioning, --popover dark-mode tint, hover/focus handling), but none of it currently reaches a real visitor — it's dev-only dead weight in production, and a future contributor may assume it's broken rather than intentionally dormant.

Suggested fix

Either give "Posts" a real production-visible child (recent posts, category/archive shortcuts) so the documented dropdown UI earns its keep, or explicitly document that it's intentionally dormant in production so it isn't mistaken for a bug later.

Source

Found during a design critique of src/components/layout/header/Header.astro (/impeccable critique), confirmed via topnavigation.json + Header.astro's dev-only filter logic. Persisted critique snapshot: .impeccable/critique/2026-08-10T15-06-59Z__src-components-layout-header-header-astro.md.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:mediumMedium priority.status:unconfirmedReported but not yet confirmed.type:enhancementNew enhancements and features not covered by a more specific type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions