feat(docs): added page nav buttons, static search, TOC footer#1787
Merged
waleedlatif1 merged 2 commits intostagingfrom Nov 1, 2025
Merged
feat(docs): added page nav buttons, static search, TOC footer#1787waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
PageNavigationArrowscomponent adds intuitive navigation in the top-right corner TOCFootercomponent 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: falseensures 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
| Filename | Score | Overview |
|---|---|---|
| apps/docs/components/docs-layout/page-navigation-arrows.tsx | 5/5 | New component for page navigation with previous/next arrows - clean implementation with proper accessibility |
| apps/docs/components/docs-layout/toc-footer.tsx | 5/5 | New CTA component for TOC footer with hover animation - well-structured with proper accessibility attributes |
| apps/docs/app/api/search/route.ts | 5/5 | Switched to static search generation with locale-specific configuration for improved performance |
| apps/docs/app/[lang]/layout.tsx | 5/5 | Added static search configuration to RootProvider for performance optimization |
| apps/docs/app/[lang]/[[...slug]]/page.tsx | 5/5 | Integrated 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
9 files reviewed, 1 comment
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually.
Checklist