refactor(Table): remove obsolete fixed column border styles by QDyanbing · Pull Request #59607 · ant-design/ant-design · GitHub
Skip to content

refactor(Table): remove obsolete fixed column border styles - #59607

Open
QDyanbing wants to merge 1 commit into
masterfrom
remove-table-legacy-fixed-borders
Open

QDyanbing wants to merge 1 commit into
masterfrom
remove-table-legacy-fixed-borders

Conversation

@QDyanbing

Copy link
Copy Markdown
Member

English Template / 英文模板

🤔 这个变动的性质是?

  • 🆕 新特性提交
  • 🐞 Bug 修复
  • 📝 站点、文档改进
  • 📽️ 演示代码改进
  • 💄 组件样式/交互改进
  • 🤖 TypeScript 定义更新
  • 📦 包体积优化
  • ⚡️ 性能优化
  • ⭐️ 功能增强
  • 🌐 国际化改进
  • 🛠 重构
  • 🎨 代码风格优化
  • ✅ 测试用例
  • 🔀 分支合并
  • ⏩ 工作流程
  • ⌨️ 无障碍改进
  • ❓ 其他改动(是关于什么的改动?)

🔗 相关 Issue

无。来自 Table 遗留样式清理。

💡 需求背景和解决方案

当前依赖的 @rc-component/table 1.11.1 已使用 cell-fix-start、cell-fix-end 及对应的 shadow 类名,普通表格和虚拟表格均不会生成旧的 cell-fix-right-first / cell-fix-right-last 类名,但 Table 仍输出针对旧类名的边界伪元素样式。

删除 bordered、virtual 中的两块失效规则及对应注释,并移除不再使用的 calc 解构。保留当前有效的单元格边框与固定列阴影规则,不改变公开 API 或视觉表现。hashed: false 配置下,实测生成 CSS 减少 2,595 字节;其余 CSS 完全一致。

验证:

  • 普通/虚拟表格、LTR/RTL、单列/双列固定共 8 组配置,在横向滚动起点、中间、终点共 24 组画面对比中均无像素差异;旧类名的 DOM 数量均为 0,固定列边框保持 1px。
  • Table、Table.Virtual 共 39 个测试及 5 个快照通过。
  • TypeScript、ESLint、Prettier、antd lint,以及提交钩子的 Biome 检查通过。
  • 已基于最新 feature 模拟合并,无冲突。

📝 更新日志

语言 更新描述
🇺🇸 英文 No changelog required
🇨🇳 中文 无需更新日志(清理失效样式,无行为变化)

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Preview is ready

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

👁 Visual Regression Report for PR #59607 Passed ✅

🎯 Target branch: master (13d7b16)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

📖 中文报告

👁 PR #59607 视觉回归报告 通过 ✅

🎯 目标分支: master (13d7b16)

🎊 恭喜!未发现视觉回归差异。

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ddc4229-5921-4ef7-8fa0-e8f910cd61ae
📥 Commits

Reviewing files that changed from the base of the PR and between 13d7b16 and b4259ee.

📒 Files selected for processing: 2
  • components/table/style/bordered.ts
  • components/table/style/virtual.ts
💤 Files with no reviewable changes: 1
  • components/table/style/bordered.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Summary

Summary by CodeRabbit

  • 样式调整
    • 移除了表格固定列额外显示的右侧边框样式。

此更改移除了带边框表格和虚拟表格中固定右侧首列的伪元素边框样式。虚拟表格样式函数也不再从 token 解构 calc。

Changes: 表格固定列样式

Layer / File(s) Summary
移除固定列伪元素边框
components/table/style/bordered.ts, components/table/style/virtual.ts
移除带边框表格固定右侧首列的 ::after 边框规则,以及虚拟表格对应单元格的 :before 样式。genVirtualStyle 不再解构 token.calc。

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to b4259

移除的旧样式选择器不匹配当前固定列标记,普通和虚拟表格仍保留单元格边框;未发现影响合并的行为风险。

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed 标题准确概括了本次变更:移除 Table 固定列的过时边框样式。标题简洁、具体,并与变更内容一致。
Description check Passed 描述与变更内容相关。描述说明了清理失效样式、移除未使用的 calc 解构、保持视觉表现不变,以及验证结果。
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

小兔看见边框少一圈,
固定列旁留出新空间。
虚拟样式也收起旧装饰,
calc 解构不再出现。
轻轻跳过表格边缘,
抱着胡萝卜回家。

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/antd.min.js 443.26 KB (-81 B 🔽)
dist/antd-with-locales.min.js 530.11 KB (-82 B 🔽)

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 570 bytes (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.24MB -570 bytes (-0.02%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js -285 bytes 1.81MB -0.02%
antd.min.js -285 bytes 1.43MB -0.02%

@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026

Copy link
Copy Markdown

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: b4259ee
Status: ✅  Deploy successful!
Preview URL: https://1340e1c9.ant-design.pages.dev
Branch Preview URL: https://remove-table-legacy-fixed-bo.ant-design.pages.dev

View logs

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (13d7b16) to head (b4259ee).

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #59607   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          833       833           
  Lines        16053     16053           
  Branches      4211      4211           
=========================================
  Hits         16053     16053           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是横向滚动的阴影块,应该还在用的。再确认一下?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react-component/table#1238 调整后不会在生成这个classname了

@QDyanbing
QDyanbing requested a review from zombieJ October 20, 2026 09:26

This branch has not been deployed

No deployments
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.

2 participants