fix: trigger leave when hovered notifications unmount - #415
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. Walkthrough通知组件在卸载时,如果仍处于悬停状态,则执行鼠标离开处理。该处理会重置悬停状态,并按现有条件恢复计时器。 Changes通知悬停清理
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The changed unmount behavior has no identified merge-blocking issue. Automatic-close timing still warrants normal browser validation. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change may affect applications whose mouse-leave handlers require an event. No new security authority or sensitive operation was identified in the notification cleanup path, but downstream handler behavior remains uncertain. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation 未满足直接关联问题的核心编码要求。[
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
React Doctor found 1 new issue in 1 file · 1 warning · score 70 / 100 (Needs work) · 1 fixed · vs 1 warning
Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #415 +/- ##
=======================================
Coverage 99.20% 99.21%
=======================================
Files 12 12
Lines 376 380 +4
Branches 102 103 +1
=======================================
+ Hits 373 377 +4
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||

变更
Notification 在悬停状态下卸载时,通过 effect 清理调用自身的 leave 逻辑。卸载回调没有鼠标事件,因此 onMouseLeave 的 event 参数可省略。未悬停或已经离开的卡片不重复触发 leave。
List 继续依靠自身的 enter/leave 更新悬停状态,卡片卸载不强制清空 List hover,避免补位卡片仍覆盖鼠标时错误收起。
Closes #413
Closes #383
Fixes ant-design/ant-design#59412
Related: #414、ant-design/ant-design#57096(均已关闭)。
验证
Summary by CodeRabbit