-
-
Notifications
You must be signed in to change notification settings - Fork 98
fix: remove drawer mask not lock scroll #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Test case please. |
看上去是对 #350 的逆向。 |
我觉得不应该逆向改回去,可以在目前的基础上优化,不如 Drawer 的坐标 right 可以根据滚动条锁定动态变化 |
是的,逆向的。 同理如果modal 设置mask = false 情况下, body是否需要滚动? 我觉得根据container来判断似乎更加合理。 |
Walkthrough本次更改将 Drawer 组件中 Portal 的 autoLock 行为从依赖 mask 属性修改为仅依赖 mergedOpen 或 animatedVisible。无论 mask 是否为 false,只要 Drawer 处于打开或动画可见状态,autoLock 都为 true。同时,测试用例也同步调整,验证 body 滚动锁定逻辑。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Drawer
participant Portal
participant DocumentBody
User->>Drawer: 打开 Drawer
Drawer->>Portal: 设置 autoLock = mergedOpen || animatedVisible
alt autoLock 为 true
Portal->>DocumentBody: 设置 overflowY: hidden
else autoLock 为 false
Portal->>DocumentBody: 恢复 overflowY
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes(未发现超出关联 issue 目标的变更) Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
tests/index.spec.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
src/Drawer.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #472 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 144 144
Branches 53 53
=========================================
Hits 144 144 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
refer:
fix: ant-design/ant-design#49462
Summary by CodeRabbit
Bug Fixes
Tests