Repository navigation
🐛 修复导入页超长版本号溢出 - #1859
Merged
Merged
🐛 修复导入页超长版本号溢出#1859
Conversation
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.
Checklist / 检查清单
背景
导入页版本列使用固定宽度的 flex 布局,但版本号没有允许内部收缩。版本号较长时会溢出版本列,覆盖右侧的“来源 / 本地创建”等内容。
本次改动
min-w-0和overflow-hidden。truncate,箭头保持固定宽度。实现考虑
不通过单纯扩大版本列解决问题,因为版本号长度没有可靠上限。现在版本列保持 150px,内容在列内自然收缩;完整值通过悬浮提示查看,同时不改变导入数据或导入流程。
已知限制
本次只调整桌面端导入表格的版本列布局,移动端导入卡片和导入逻辑不变。
建议审查重点
截图
用真实
DesktopView组件 + 项目 Tailwind 样式在 Edge 中渲染导入表格对比(第一行模拟 issue 中的1.32.7.113 → 1.32.7.113.20261114,第二行为超长新增版本号,第三行为普通版本号)。修复前:更新版本号溢出覆盖「来源」列,新增版本号换行成三行
修复后:版本号在列内截断,悬浮显示完整「旧版 → 新版」
参考
dist/ext、真实导入 ZIP 和真实src/import.html页面;截图已在提交前生成并核验,临时截图未提交到仓库。关联
Fixes #1858
验证
pnpm exec vitest run src/pages/import/components.test.tsx --no-coverage --reporter=verbose— 23 个测试通过。pnpm exec prettier --check src/pages/import/components.tsx src/pages/import/components.test.tsx— 通过。pnpm exec tsc --noEmit— 通过。pnpm run build— 构建成功;仅有仓库原有的 bundle size 和 Monaco 动态依赖警告。git diff --check— 通过。