Feat/virtual scroll infinite load#5
Merged
Conversation
使用 @tanstack/react-virtual 实现文章列表的虚拟滚动, 支持基于 cursor 的无限加载,优化大数据量下的渲染性能。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
About 页面包含项目介绍、技术栈展示和功能特性说明, 同步更新 README.md 以反映最新的项目结构。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
添加 Dockerfile 和 .dockerignore 用于容器化部署, package.json 新增 start 脚本支持生产环境运行。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
This pull request implements infinite scrolling for the public articles list using virtual rendering, improving both performance and user experience. It introduces a new cursor-based pagination API, updates the frontend to use a virtualized list, and cleans up the codebase by removing the old paginated articles page. Supporting changes include dependency updates and improved documentation.
Infinite Scroll & Virtualization for Articles
VirtualArticleListcomponent using@tanstack/react-virtualto efficiently render large lists of articles with infinite loading support.src/routes/_app/articles.tsx) to use the new virtualized list component instead of the old paginated approach.ArticlesPageimplementation. [1] [2]Backend & Query Layer Updates
getPublishedArticlesInfiniteFnserver function for cursor-based pagination. [1] [2]getPublishedArticlesInfiniteSchemaand types. [1] [2]usePublishedArticlesInfinitefor infinite loading of articles. [1] [2]Dependency & Build Improvements
@tanstack/react-virtualand related packages to dependencies and lockfile. [1] [2] [3] [4] [5] [6]startscript and improved Docker support:startscript topackage.json..dockerignoreand a multi-stageDockerfilefor optimized builds. [1] [2]Documentation Updates
README.mdto reflect new directory structure, data layer, and route changes. [1] [2]These changes modernize the articles list with infinite scrolling and virtualization, streamline the codebase, and improve build and deployment workflows.