-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement(code): removed dedicated code-optimized virtualized viewer, baked it into the code component #2234
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
…r, baked it into the code component
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR consolidates the virtualized code viewer functionality into the main
The architecture now follows a cleaner pattern where virtualization is an opt-in feature of the existing Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Terminal
participant Code.Viewer
participant VirtualizedViewerInner
participant ViewerInner
participant List (react-window)
Terminal->>Code.Viewer: render with virtualized=true
Code.Viewer->>Code.Viewer: Build innerProps
alt virtualized=true
Code.Viewer->>VirtualizedViewerInner: render
VirtualizedViewerInner->>VirtualizedViewerInner: Setup hooks (listRef, containerHeight, dynamicRowHeight)
VirtualizedViewerInner->>VirtualizedViewerInner: Process lines with syntax highlighting
VirtualizedViewerInner->>List (react-window): render virtualized rows
List (react-window)-->>VirtualizedViewerInner: Only visible rows rendered
else virtualized=false
Code.Viewer->>ViewerInner: render
ViewerInner->>ViewerInner: Process code with syntax highlighting
ViewerInner-->>Code.Viewer: Standard DOM rendering
end
|
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, 1 comment
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
Summary
Type of Change
Testing
Tested manually
Checklist