[codex] support preview mask closable#506
Conversation
|
@QDyanbing 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 Run ID: 📒 Files selected for processing (3)
功能演示本次变更为预览配置中添加了新的 变更详情
代码审查工作量评估🎯 2 (Simple) | ⏱️ ~10 minutes 相关拉取请求
建议审阅者
庆祝诗
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 the maskClosable property to the Preview component, allowing users to control whether clicking the mask closes the preview. The property defaults to true and has been integrated into the component's logic, documented in the README, and verified with a new test case. I have no feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #506 +/- ##
=======================================
Coverage 99.44% 99.44%
=======================================
Files 17 17
Lines 538 540 +2
Branches 161 164 +3
=======================================
+ Hits 535 537 +2
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
变更内容
maskClosable配置,默认保持为truemaskClosable={false}时,点击预览遮罩不再触发关闭变更原因
当前
rc-image只支持通过closeIcon控制关闭按钮展示,但遮罩点击始终会直接触发onClose。这会导致上层即使已经计算出 mask 的 closable 语义,也无法真正控制预览遮罩的关闭行为。
影响说明
maskClosable只影响遮罩点击关闭行为Esc关闭行为保持不变mask.closable提供底层能力验证
npm run tscnpm testRelated: ant-design/ant-design#57606
Summary by CodeRabbit
发布说明
新功能
maskClosable配置选项(默认启用),用于控制点击遮罩层是否关闭预览窗口。文档
maskClosable参数。测试