Skip to content

Remove duplicate navigation in DocsLayout sidebar#164

Merged
hotlong merged 2 commits intomainfrom
copilot/review-top-navigation-compliance
Jan 23, 2026
Merged

Remove duplicate navigation in DocsLayout sidebar#164
hotlong merged 2 commits intomainfrom
copilot/review-top-navigation-compliance

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Documentation sidebar was rendering navigation links twice. The links prop on DocsLayout generates top navbar items, not sidebar navigation—sidebar comes from the tree prop (pageTree).

Changes

  • apps/site/app/docs/layout.tsx: Removed links prop from DocsLayout
    • Navigation now derives exclusively from tree={source.pageTree}
    • Keeps nav prop for logo/branding only

Before:

<DocsLayout 
  tree={source.pageTree} 
  nav={{ title: <Logo />, url: '/' }}
  links={[...]} // Creates duplicate navigation in sidebar
>

After:

<DocsLayout 
  tree={source.pageTree} 
  nav={{ title: <Logo />, url: '/' }}
>

Screenshots

Before (duplicate navigation):
image

After (single navigation):
image

Original prompt

审核顶部导航控件是否符合fumadocs规范,电脑端好像目前显示了两个导航


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 23, 2026

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

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 23, 2026 0:08am
objectui-site Ready Ready Preview, Comment Jan 23, 2026 0:08am

Request Review

@vercel vercel bot temporarily deployed to Preview – objectui-docs January 23, 2026 11:58 Inactive
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – objectui-docs January 23, 2026 12:06 Inactive
Copilot AI changed the title [WIP] Review top navigation component for fumadocs compliance Remove duplicate navigation in DocsLayout sidebar Jan 23, 2026
Copilot AI requested a review from hotlong January 23, 2026 12:07
@hotlong hotlong marked this pull request as ready for review January 23, 2026 12:16
Copilot AI review requested due to automatic review settings January 23, 2026 12:16
@hotlong hotlong merged commit 141628f into main Jan 23, 2026
5 of 6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a duplicate navigation issue in the documentation site by removing the incorrectly used links prop from the DocsLayout component. The links prop was creating a top navigation bar that duplicated the sidebar navigation already provided by the tree prop.

Changes:

  • Removed the links prop array from DocsLayout in the documentation layout file
  • Navigation now derives exclusively from the tree prop (pageTree) which generates the sidebar
  • Retained the nav prop for logo/branding display

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.

3 participants