Skip to content

feat(navigation): add route defined tabs - #1272

Open
harry-whorlow wants to merge 2 commits into
TanStack:mainfrom
harry-whorlow:route-defined-tabs
Open

harry-whorlow wants to merge 2 commits into
TanStack:mainfrom
harry-whorlow:route-defined-tabs

Conversation

@harry-whorlow

@harry-whorlow harry-whorlow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added configurable custom tool tabs to library documentation, including catalog navigation.
    • Added route-aware documentation tab selection for pages with custom tab settings.
    • Added full-width layouts for Examples, npm statistics, and catalog pages.
  • Improvements
    • Improved active-state handling and menu expansion for custom tool destinations.
    • Custom tool links now navigate directly without unnecessary route preloading.

@harry-whorlow harry-whorlow changed the title feat(navigation): add route defiend tabs feat(navigation): add route defined tabs Sep 14, 2026
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: df88976c-32f7-49ff-bd94-634c7b8f0821

📥 Commits

Reviewing files that changed from the base of the PR and between 2a43601 and 4a522ab.

📒 Files selected for processing (1)
  • src/utils/docsNavTabs.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change adds custom tool tab definitions and route metadata. Library navigation and layout logic now use library-aware custom targets and route-provided tab settings. Charts-specific menu handling is removed, and related navigation tests use the updated signatures.

Changes

Custom library tool tabs

Layer / File(s) Summary
Tab contracts and route metadata
src/libraries/custom-tool-tabs.ts, src/router.tsx, src/utils/docsNavTabs.ts, src/routes/_library/...
Custom tool tab types, target matching, route docsTab metadata, and tab override handling are added.
Custom target navigation
src/components/library-layout-navigation.ts, tests/charts-sidebar-navigation.test.ts
Navigation helpers use typed LibraryId values and classify targets with isCustomToolTarget. Tests pass the updated arguments.
Library layout integration
src/components/LibraryLayout.tsx
Charts-specific menu entries are removed. Custom tabs, route tab metadata, custom link behavior, and docsTab.fullBleed now control layout navigation.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant RouteStaticData
  participant LibraryLayout
  participant customToolTabs
  participant NavigationLink
  RouteStaticData->>LibraryLayout: Provide docsTab metadata
  LibraryLayout->>customToolTabs: Check library and target
  customToolTabs-->>LibraryLayout: Return custom target status
  LibraryLayout->>NavigationLink: Configure origin and preload behavior
Loading

Suggested reviewers: tombeckenham

Merge Risk: ⚪ Minimal · up to 4a522

Custom tabs, active-tab selection, and full-bleed route settings are aligned, with no established merge-blocking behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding route-defined navigation tabs and related custom tool tab support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant