Skip to content
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

fix: unified modal and drawer protal and fix overflow conflict #17600

Merged
merged 3 commits into from
Jul 17, 2019

Conversation

jljsj33
Copy link
Member

@jljsj33 jljsj33 commented Jul 11, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

👻 What's the background?

💡 Solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese 1. 解决 modal 和 drawer 同时对 body 的 overflow 操作问题, fix #17323 #16680
2. 更新 drawer 和 modal 的 getContainer, 同时支持 HTMLElement | () => HTMLElement | Selectors | false, false 为渲染在当前 dom 里

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/drawer/index.en-US.md
View rendered components/drawer/index.zh-CN.md
View rendered components/modal/index.en-US.md
View rendered components/modal/index.zh-CN.md

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Jul 11, 2019

Deploy preview for ant-design ready!

Built with commit d0c636f

https://deploy-preview-17600--ant-design.netlify.com

@jljsj33 jljsj33 requested review from zombieJ and afc163 July 11, 2019 13:28
@jljsj33
Copy link
Member Author

jljsj33 commented Jul 11, 2019

为什么 15 会挂?

@ztplz
Copy link
Contributor

ztplz commented Jul 12, 2019

别搞15了 又没啥人用 都快17了

@codecov
Copy link

codecov bot commented Jul 12, 2019

Codecov Report

Merging #17600 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17600      +/-   ##
==========================================
- Coverage   96.09%   96.05%   -0.05%     
==========================================
  Files         267      267              
  Lines        7433     7425       -8     
  Branches     2035     2033       -2     
==========================================
- Hits         7143     7132      -11     
- Misses        288      291       +3     
  Partials        2        2
Impacted Files Coverage Δ
components/modal/confirm.tsx 96.29% <100%> (ø) ⬆️
components/drawer/index.tsx 98.57% <100%> (-0.15%) ⬇️
components/modal/Modal.tsx 100% <100%> (ø) ⬆️
components/_util/wave.tsx 85.84% <0%> (-2.84%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56166f6...d0c636f. Read the comment docs.

@jljsj33
Copy link
Member Author

jljsj33 commented Jul 12, 2019

我也觉得,,汗。。。

@jljsj33
Copy link
Member Author

jljsj33 commented Jul 12, 2019

干他娘的,,怎么又挂了。。。

@zombieJ
Copy link
Member

zombieJ commented Jul 15, 2019

3.x 版本里 15 还是要看的。

@ztplz
Copy link
Contributor

ztplz commented Jul 15, 2019

16那么多好用的都不能用

| getContainer | 指定 Drawer 挂载的 HTML 节点 | HTMLElement \| `() => HTMLElement` \| Selectors | 'body' | 3.7.0 |
| maskClosable | 点击蒙层是否允许关闭 | boolean | true | 3.7.0 | 3.7.0 |
| mask | 是否展示遮罩 | Boolean | true |
| getContainer | 指定 Drawer 挂载的 HTML 节点, false 为挂载在当前 dom | HTMLElement \| `() => HTMLElement` \| Selectors \| false | 'body' | 3.7.0 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这应该是新的 feature 了吧?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不算吧。这 API 本来就存在的,drawer 本来就支持的,,现在是全部都放出来了,,modal 的是跟 drawer 统一了。。不算新功能吧。。

@jljsj33
Copy link
Member Author

jljsj33 commented Jul 17, 2019

@afc163 review

@afc163 afc163 changed the title update modal and drawer protal fix: update modal and drawer protal Jul 17, 2019
@afc163 afc163 changed the title fix: update modal and drawer protal fix: unified modal and drawer protal and fix overflow conflict Jul 17, 2019
@afc163 afc163 merged commit 85ee1e4 into master Jul 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the merge-portal branch July 17, 2019 11:28
@zombieJ zombieJ mentioned this pull request Jul 19, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two scrollbars appears when using modal inside drawer with drawer and body with scroll
4 participants