Skip to content

added interactive nesting component - #6821

Open
RoyceWilliams510 wants to merge 5 commits into
mainfrom
royce/nesting-component
Open

added interactive nesting component#6821
RoyceWilliams510 wants to merge 5 commits into
mainfrom
royce/nesting-component

Conversation

@RoyceWilliams510

@RoyceWilliams510 RoyceWilliams510 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Documentation changes

Created a new interactive navigation schema builder for the nesting section of navigation page. Allows user to combines components of our navigation schema and provides json output to copy to help structure their own docs.


For Reviewers

When reviewing documentation PRs, please consider:

✅ Technical accuracy

  • Code examples work as written
  • Commands and configurations are correct
  • Links resolve to the right destinations
  • Prerequisites and requirements are accurate

✅ Clarity and completeness

  • Instructions are clear and easy to follow
  • Steps are in logical order
  • Nothing important is missing
  • Examples help illustrate the concepts

✅ User experience

  • A new user could follow these docs successfully
  • Common gotchas or edge cases are addressed
  • Error messages or troubleshooting guidance is helpful

Note

Low Risk
Documentation-only change plus a client-side docs snippet; no backend, auth, or production app logic.

Overview
Replaces the long static CodeGroup JSON examples in the Nesting section of organize/navigation.mdx with an interactive Navigation builder embedded via NavigationBuilder.

Readers pick a root pattern (tabs, products, versions, etc.), add and nest navigation elements with rules that mirror the doc’s “one child type per level” guidance, then copy generated navigation JSON or use a live preview (navbar switchers, anchors/menu, sidebar groups/pages).

The new snippets/navigation-builder.jsx implements the tree editor, CHILD_OPTIONS validation, JSON serialization, clipboard copy, and preview interactions (tabs, dropdowns, keyboard/pointer dismiss).

Reviewed by Cursor Bugbot for commit 0631ebe. Bugbot is set up for automated code reviews on this repo. Configure here.

@RoyceWilliams510

Copy link
Copy Markdown
Collaborator Author

Excited for feedback:

CleanShot.2026-07-30.at.14.18.50.mp4

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jul 30, 2026, 9:25 PM

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jul 30, 2026, 9:25 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟡 Building Jul 30, 2026, 9:22 PM

@mintlify

mintlify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟡 Building Jul 30, 2026, 9:22 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ethanpalm

Copy link
Copy Markdown
Collaborator

pushed changes making it more interactive and giving a preview of what the nav structure looks like

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0631ebe. Configure here.

const empty = { navbarRows: [], sidebarHeaderRows: [], sidebarContent: null }
if (!division || !nodes.length) return empty
if (division === "pages") {
return { ...empty, sidebarContent: <div className="space-y-0.5">{nodes.map((entry) => renderPreviewPage(entry))}</div> }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Preview crashes on nested groups

High Severity

collectPreview always renders pages entries with renderPreviewPage, which assumes every entry is a leaf with a value string. + Nest a group can put group containers into that same pages array, so preview calls .trim() on undefined and throws. Because preview is computed on every render, this takes down the whole builder, not just the preview pane. The editor and JSON paths already branch on entry.type.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0631ebe. Configure here.

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