feat(readme-modal): README 弹窗增大为近全屏尺寸 - #431
Conversation
将点击仓库卡片的 README 弹窗从 max-w-[1130px]/max-h-[90vh] 改为 与生成仓库信息卡插件弹窗(PluginPageModal)一致的近全屏尺寸: w/h 均为 calc(100vh|100vw - 2rem)。DialogContent 由 grid 改为 flex-col,内层容器用 flex-1 填满;RepositoryCard 的懒加载占位 弹窗同步同尺寸,避免弹窗真实加载时出现尺寸跳变。
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughREADME 展示弹窗和加载占位弹窗改为接近视口大小的布局。两个弹窗的内部容器均调整为填满可用高度。 ChangesREADME 弹窗布局
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to Both README dialogs use the intended near-viewport layout, and long README content remains scrollable. No concrete merge-blocking issue is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
变更内容
将点击仓库卡片打开的 README 弹窗增大为近全屏尺寸,与生成仓库信息卡插件弹窗(
PluginPageModal)的尺寸保持一致。之前
max-w-[1130px]+ 内层max-h-[90vh]之后
w-[calc(100vw_-_2rem)]/h-[calc(100vh_-_2rem)](与PluginPageModal完全相同的尺寸四元组),四周各留 1rem 边距,几乎覆盖整个页面具体修改
src/components/ReadmeModal.tsxDialogContent:宽度改为calc(100vw - 2rem)(去掉max-w-[1130px]),高度改为calc(100vh - 2rem);grid改为flex flex-col(对齐 Modal 的 scrollable 布局模式)max-h-[90vh]改为flex-1 min-h-0,由父级固定高度驱动填充,头部 / TOC 侧栏 / 滚动内容区 / 返回顶部按钮 / 阅读进度条的布局关系不变src/components/RepositoryCard.tsx验证
eslint通过(仅改动文件)tsc -b --noEmit通过vitest run全量通过:146 个测试文件 / 1687 个用例100vw的滚动条宽度风险已被 Radix Dialog(react-remove-scroll)打开时移除页面滚动条所抵消,与PluginPageModal行为一致其他使用方
ReadmeModal的全部使用方(RepositoryCard、SubscriptionRepoCard、BatchStarImportDialog)仅传入 props,不依赖旧尺寸;统一增大后各入口表现一致。Summary by CodeRabbit