Skip to content

🐛 修复导入页超长版本号溢出 - #1859

Merged
CodFrm merged 1 commit into
mainfrom
fix/issue-1858-version-overflow
Nov 16, 2026
Merged

CodFrm merged 1 commit into
mainfrom
fix/issue-1858-version-overflow

Conversation

@CodFrm

@CodFrm CodFrm commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Checklist / 检查清单

  • Fixes mentioned issues / 修复已提及的问题
  • Code reviewed by human / 代码通过人工检查
  • Changes tested / 已完成测试

背景

导入页版本列使用固定宽度的 flex 布局,但版本号没有允许内部收缩。版本号较长时会溢出版本列,覆盖右侧的“来源 / 本地创建”等内容。

本次改动

  • 为版本列增加 min-w-0 和 overflow-hidden。
  • 更新版本号的旧版本、新版本分别使用 truncate,箭头保持固定宽度。
  • 使用现有 Tooltip 展示完整版本号,避免截断后丢失信息。
  • 增加长版本号回归测试。

实现考虑

不通过单纯扩大版本列解决问题,因为版本号长度没有可靠上限。现在版本列保持 150px,内容在列内自然收缩;完整值通过悬浮提示查看,同时不改变导入数据或导入流程。

已知限制

本次只调整桌面端导入表格的版本列布局,移动端导入卡片和导入逻辑不变。

建议审查重点

  • 超长更新版本号是否始终被限制在版本列内。
  • 旧版本、新版本和箭头在收缩时是否仍保持可读的布局关系。
  • 悬浮 Tooltip 是否保留完整的旧版 → 新版信息。

截图

用真实 DesktopView 组件 + 项目 Tailwind 样式在 Edge 中渲染导入表格对比(第一行模拟 issue 中的 1.32.7.113 → 1.32.7.113.20261114,第二行为超长新增版本号,第三行为普通版本号)。

修复前:更新版本号溢出覆盖「来源」列,新增版本号换行成三行

pr1859-before

修复后:版本号在列内截断,悬浮显示完整「旧版 → 新版」

pr1859-after-hover

参考

关联

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 — 通过。

@CodFrm
CodFrm merged commit c8e6811 into main Nov 16, 2026
11 checks passed
@CodFrm
CodFrm deleted the fix/issue-1858-version-overflow branch November 16, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Firefox导入脚本时,脚本的版本号过长会导致UI重叠

1 participant