Repository navigation
Conversation
|
@yunfeizhu is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
普通表格的 sticky holder 语义 src/Table.tsx, tests/semantic.spec.tsx |
ComponentsSemantic 新增 holder。sticky 模式下,表头和主体容器应用对应的 holder 类名与样式。测试覆盖空数据、属性更新、summary 行,以及 content 与 holder 的语义区分。 |
虚拟表格的 BodyHolder src/VirtualTable/BodyHolder.tsx, src/VirtualTable/BodyGrid.tsx, tests/semantic.spec.tsx |
虚拟列表改用 BodyHolder。该组件读取上下文中的 holder 属性和 body wrapper 配置,合并类名与样式并转发 ref。测试验证自定义 wrapper 接收 holder 属性,且其滚动事件调用 onScroll。 |
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant BodyGrid
participant BodyHolder
participant TableContext
participant StaticContext
participant BodyWrapper
BodyGrid->>BodyHolder: 将 BodyHolder 用作虚拟列表组件
BodyHolder->>TableContext: 读取 holder 类名和样式
BodyHolder->>StaticContext: 读取 body wrapper 配置
BodyHolder->>BodyWrapper: 传递合并后的类名、样式和 ref
BodyWrapper->>BodyGrid: holder 滚动时触发 onScroll
Suggested reviewers: qdyanbing
Merge Risk: 
Minimal · previous review 18226
-
The holder semantics appear ready to merge after normal checks; no actionable issue was identified.
Pre-merge checks: 
5
-
Passed checks: 5 passed -
Finishing Touches
-
Fix failing CI checks
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- 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.
小兔沿着表格边,
轻轻检查 holder 的边。
类名样式排整齐,
虚拟滚动接住 ref。
旧节点仍在原处,
新属性随风更新。
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ed756bae-be94-43b3-b8ce-ed9df370ef08
📒 Files selected for processing: 4
-
src/Table.tsx
src/VirtualTable/BodyGrid.tsx
src/VirtualTable/BodyHolder.tsx
tests/semantic.spec.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ed756bae-be94-43b3-b8ce-ed9df370ef08
📒 Files selected for processing: 4
-
src/Table.tsxsrc/VirtualTable/BodyGrid.tsxsrc/VirtualTable/BodyHolder.tsxtests/semantic.spec.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1520 +/- ##
==========================================
+ Coverage 99.09% 99.16% +0.07%
==========================================
Files 45 46 +1
Lines 1429 1436 +7
Branches 432 433 +1
==========================================
+ Hits 1416 1424 +8
+ Misses 13 12 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Could we keep the virtual holder height in sync with the height passed to VirtualList? With |
Summary
Related to ant-design/ant-design#59485. This implements the rc-table part of the proposed
header.holder/body.holderAPI.When
scroll.yorstickyis enabled, the header and body have separate containers andcontentis no longer rendered. Neither container currently accepts semantic classes or styles.header.holderto the outer fixed/sticky header container.body.holderto the body scroll container, including the virtual-list holder and the empty-data fallback.contentslot.content,header.wrapper,body.wrapper, and fixed summary behavior unchanged.The virtual holder uses the virtual list's existing
componentextension point; no virtual-list API or dependency change is needed.Example
The same holder keys work with
VirtualTable, with or without rows.Verification
git diff --checkpassed.Follow-up
Ant Design will need its holder types, semantic demo/docs, and dependency version updated after this lands and is released. This PR deliberately leaves fixed summary semantics out of scope and does not close the Ant Design issue by itself.
Summary by CodeRabbit