Skip to content

feat(header): ✨ add navigation menu with dropdown support - #814

Open
aXenDeveloper wants to merge 2 commits into
canaryfrom
feat/nav
Open

aXenDeveloper wants to merge 2 commits into
canaryfrom
feat/nav

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
vitnode-prod Ready Ready Preview Sep 15, 2026 7:30pm UTC

Request Review

@github-actions github-actions Bot added the 💡 Feature A new feature label Sep 15, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0473ff85ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

discover: t(HEADER_NAV_MESSAGE_KEYS.discover),
search: t(HEADER_NAV_MESSAGE_KEYS.search),
}),
...EXAMPLE_NAV_ITEMS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the example links from the shared header

Every consumer of MainHeader, including the fresh create-vitnode-app scaffold, now receives these demo Community/Resources entries unconditionally. That scaffold has no plugins and its registered core routes include /discover and /search but not /docs, so selecting Resources → Documentation reaches the not-found page; the hard-coded English labels also bypass the active locale. Remove the examples from the library default or accept real application-provided navigation instead.

Useful? React with 👍 / 👎.

{...props}
/>
>
<span

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the decorative highlight outside the list

NavigationMenuPrimitive.List renders an HTMLUListElement, but this adds a <span> as its direct child alongside the menu's <li> items. A <ul> may only contain list items and script-supporting elements, so this produces invalid list markup and can interfere with assistive technology's list representation; render the decoration outside the list or through CSS instead.

AGENTS.md reference: AGENTS.md:L56-L56

Useful? React with 👍 / 👎.

Comment on lines +133 to +137
onFocus={event => {
const item = itemUnder(event.target);
if (item) moveHighlightTo(item);
onFocus?.(event);
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear the highlight when keyboard focus leaves

When a keyboard user focuses an inactive menu item and then tabs completely out of the navigation, this handler makes the highlight visible but no blur handler calls settleHighlight or hides it. With no open trigger or active link mutation to wake the observers, the last focused item remains visibly highlighted after focus has moved elsewhere; handle focus leaving the list analogously to onPointerLeave.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab2c0fa327

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


return (
<NavigationMenuItem>
<NavigationMenuTrigger className="text-muted-foreground hover:text-foreground data-popup-open:text-foreground">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reflect active child routes on the dropdown trigger

When the current route matches a dropdown child, only the link inside the closed popup receives active; the visible trigger has styling only for hover and data-popup-open. As a result, users on /docs or another child route get no persistent indication of their current top-level section until they open the menu. Derive the trigger's active state from its children and expose a corresponding active style.

Useful? React with 👍 / 👎.

>
<span className="font-medium">{child.label}</span>
{child.description ? (
<span className="text-muted-foreground text-xs leading-relaxed text-pretty">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep dropdown descriptions at least 14px

Every dropdown description is rendered with Tailwind's text-xs (12px), below the repository's explicit 14px minimum for body text. This makes the supporting navigation copy unnecessarily difficult to read; use text-sm or another size of at least 14px.

AGENTS.md reference: AGENTS.md:L71-L71

Useful? React with 👍 / 👎.

/** One entry in the main nav - a link, or a dropdown when it carries `items`. */
export interface HeaderNavItem {
href: string;
items?: HeaderNavChildItem[];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the new dropdown navigation contract

This adds the items contract and dropdown behavior without documenting how navigation entries, child descriptions, and active routes are intended to be configured; a repo-wide documentation search found no HeaderNavItem or HeaderNavMenu guidance. Add concise documentation for the feature as required by the repository contribution rules.

AGENTS.md reference: AGENTS.md:L76-L76

Useful? React with 👍 / 👎.

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

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant