-
Notifications
You must be signed in to change notification settings - Fork 3.3k
improvement(docs): instant copy button + performance optimizations #3076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryImproved docs page performance by moving markdown content loading to server-side, eliminating client-side fetch delays for the "Copy page" button. Added Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant NextJS as Next.js Server
participant MDX as MDX Loader
participant Component as Page Component
Note over Browser,Component: Before (Client-side fetch)
Browser->>Component: Load page
Component->>Browser: Render with copy button
Browser->>Browser: User clicks "Copy page"
Browser->>NextJS: fetch(markdownUrl)
NextJS-->>Browser: Raw markdown content
Browser->>Browser: Copy to clipboard
Note over Browser,Component: After (Server-side)
Browser->>NextJS: Request page
NextJS->>MDX: getText('processed')
MDX-->>NextJS: Markdown content
NextJS->>Component: Render with content prop
Component->>Browser: Page with embedded content
Browser->>Browser: User clicks "Copy page"
Browser->>Browser: Instant copy (no fetch)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
There was a problem hiding this comment.
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 and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
display: 'swap'to prevent invisible text during font loadlazyOnloadstrategyType of Change
Testing
Tested manually
Checklist