Conversation
There was a problem hiding this comment.
Code Review
This pull request simplifies the column width calculation in table-facet.ts by removing a redundant round() call on adaptiveColWidth, as it is already floored in getAdaptiveColWidth. There are no review comments to address, and the change looks correct.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Size Change: +157 B (+0.02%) Total Size: 745 kB 📦 View Changed
ℹ️ View Unchanged
|
|
🎉 This PR is included in version @antv/s2-v2.7.2-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
🐛 Bugfix
🔧 Chore
📝 Description
Maintain integer column widths using round(), and compensate for any remainder pixels by allocating them to the last auto-fit column.
Only columns that actually use auto-fit widths are eligible for this compensation (excluding row index columns, manually resized columns, and columns with a custom colCell.width). Therefore, scenarios involving custom column widths remain completely unaffected.
"Distribute the remainder pixels lost during floor() calculation to a specific column (typically the last one), ensuring that the total column width exactly matches the available width."
保持 round() 整数列宽,余数补给最后一个自适应列
只有实际使用自适应宽度的列才参与补偿(排除序号列、拖拽调整过的列、有自定义 colCell.width 的列),所以自定义列宽场景不受影响。
"将 floor() 丢失的余数像素分配到某一列(通常最后一列),确保总列宽恰好等于可用宽度"
🖼️ Screenshot
🔍 Self-Check before the merge