Skip to content

feat(docs): added page nav buttons, static search, TOC footer - #1787

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/do
Nov 1, 2025
Merged

feat(docs): added page nav buttons, static search, TOC footer#1787
waleedlatif1 merged 2 commits into
stagingfrom
improvement/do

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • added page nav buttons, static search, TOC footer
  • significant speedup in search, improved transition from docs -> app with CTA

Type of Change

  • New feature

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Nov 1, 2025

Copy link
Copy Markdown

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

ProjectDeploymentPreviewCommentsUpdated (UTC)
docsReadyReadyPreviewCommentNov 1, 2025 9:36pm

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR enhances the documentation site with improved navigation and search performance. The changes introduce page navigation arrows for quick prev/next navigation, a CTA footer in the table of contents, and a significant performance upgrade by switching from server-side to static search generation.

Key improvements:

  • Static search generation with locale-specific stemming configuration provides faster search results
  • New PageNavigationArrows component adds intuitive navigation in the top-right corner
  • TOCFooter component adds a conversion-focused CTA with smooth hover animations
  • Sidebar folders now automatically expand/collapse based on active page for better UX
  • Minor visual refinements to button styling and sidebar colors for improved consistency

Technical highlights:

  • Proper accessibility attributes (aria-label, aria-hidden) on all interactive elements
  • Uses path aliases (@/) consistently per project standards
  • Clean component separation with clear prop interfaces
  • revalidate: false ensures search index is static for optimal performance

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - all changes are additive UI enhancements with proper testing
  • Score reflects well-structured code with proper accessibility, good separation of concerns, performance improvements, and no breaking changes. One minor style suggestion about extracting config, but not critical.
  • No files require special attention - all changes are straightforward UI enhancements

Important Files Changed

File Analysis

FilenameScoreOverview
apps/docs/components/docs-layout/page-navigation-arrows.tsx5/5New component for page navigation with previous/next arrows - clean implementation with proper accessibility
apps/docs/components/docs-layout/toc-footer.tsx5/5New CTA component for TOC footer with hover animation - well-structured with proper accessibility attributes
apps/docs/app/api/search/route.ts5/5Switched to static search generation with locale-specific configuration for improved performance
apps/docs/app/[lang]/layout.tsx5/5Added static search configuration to RootProvider for performance optimization
apps/docs/app/[lang]/[[...slug]]/page.tsx5/5Integrated new page navigation arrows and TOC footer components, disabled breadcrumb display

Sequence Diagram

sequenceDiagram
participant User
participant Browser
participant Page as [[...slug]]/page.tsx
participant Layout as [lang]/layout.tsx
participant RootProvider
participant SearchRoute as /api/search/route.ts
participant NavArrows as PageNavigationArrows
participant TOCFooter
User->>Browser: Navigates to docs page
Browser->>Layout: Request page
Layout->>RootProvider: Initialize with static search config
RootProvider->>Page: Render page with components
Page->>Page: Fetch page data & neighbours
Page->>NavArrows: Pass previous/next page data
NavArrows->>NavArrows: Render navigation arrows
Page->>TOCFooter: Render in TOC footer slot
TOCFooter->>TOCFooter: Initialize hover state
User->>User: Hovers over CTA button
TOCFooter->>TOCFooter: Toggle icon (ChevronRight ↔ ArrowRight)
User->>NavArrows: Clicks next/previous arrow
NavArrows->>Browser: Navigate to adjacent page
Browser->>Page: Load new page
User->>Browser: Types in search
Browser->>SearchRoute: Query search endpoint
SearchRoute->>SearchRoute: Use staticGET with locale map
SearchRoute->>Browser: Return pre-generated static results
Browser->>User: Display search results
Loading

9 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment threadapps/docs/components/docs-layout/toc-footer.tsx
@waleedlatif1
waleedlatif1 merged commit 5479461 into stagingNov 1, 2025
9 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/do branch November 1, 2025 21:38
@waleedlatif1waleedlatif1 mentioned this pull request Nov 1, 2025
10 tasks
waleedlatif1 added a commit that referenced this pull request Nov 12, 2025
* feat(docs): added page nav buttons, static search, TOC footer
* back to dynamic search since indexes are too large, added caching hour over hour
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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

@waleedlatif1