fix(table): fix row hover with expanded offset rowSpan - #1488
fix(table): fix row hover with expanded offset rowSpan#1488jiangrong-devops wants to merge 5 commits into
Conversation
|
@jiangrong-devops is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough该 PR 增加 Changes展开行悬停范围修复
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a fix to ensure that row hover states remain accurate when expanded row offsets are used in the table. It adds a 'hoverRowSpan' property to handle row span calculations independently from the layout row span, which is modified by expanded rows. The changes are implemented across 'BodyRow', 'Cell', and 'VirtualCell' components, and verified with a new test case in 'Hover.spec.tsx'. I have no feedback to provide as there were no review comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1488 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 45 45
Lines 1372 1374 +2
Branches 411 412 +1
=======================================
+ Hits 1359 1361 +2
Misses 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Respect legacy render rowSpan when calculating hover ranges and avoid mutating objects returned by onCell. Add regression coverage for legacy cells, stable props, StrictMode, and expanded row rerenders.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/Hover.spec.tsx`:
- Around line 190-238: Update the test case “keeps legacy render rowSpan
priority for hover range” to render an expanded row before asserting hover
behavior, using the existing expandable configuration and a supported expansion
mechanism such as expandedRowKeys or defaultExpandAllRows. Keep the legacy
rowSpan assertions and expandedRowOffset setup intact so the test covers hover
ranges after the physical expanded row is inserted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d0c9609-8631-4244-9fa8-5d3c6ff82688
📒 Files selected for processing (3)
src/Body/BodyRow.tsxsrc/Cell/index.tsxtests/Hover.spec.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
- src/Body/BodyRow.tsx
- src/Cell/index.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
Summary by CodeRabbit
Bug Fixes
Tests