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

feat: add modalRender #195

Merged
merged 4 commits into from
Aug 31, 2020
Merged

feat: add modalRender #195

merged 4 commits into from
Aug 31, 2020

Conversation

jhoneybee
Copy link
Contributor

@jhoneybee jhoneybee commented Aug 13, 2020

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 组件样式改进
  • TypeScript 定义更新
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

ant-design/ant-design#16613
ant-design/ant-design#13230
ant-design/ant-design#4617
ant-design/ant-design#374

💡 需求背景和解决方案

添加Modal组件框的body可自定义。这样可以方便的重写body, 来进行自定义拖拽,或者最大化,最小化等功能

📝 更新日志怎么写?

语言 更新描述
🇺🇸 英文
🇨🇳 中文 添加一个modalRender 属性

☑️ 请求合并前的自查清单

请自检并全部勾选上

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@coveralls
Copy link

coveralls commented Aug 13, 2020

Coverage Status

Coverage increased (+0.9%) to 92.216% when pulling 16fc0cc on jhoneybee:master into d96907a on react-component:master.

@07akioni
Copy link

please add a test case for the feature

@07akioni
Copy link

I my memory, antd side always use overlay to indicate the content of a pop element. should it be just overlay?

@afc163
Copy link
Member

afc163 commented Aug 13, 2020

#119 能满足需求么?

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 13, 2020

#119 能满足需求么?

可以满足,但是通过wrapRenderer,可以将react-draggable解耦出去,这样可以方便的扩展操作modal的body

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 13, 2020

I my memory, antd side always use overlay to indicate the content of a pop element. should it be just overlay?

yes , I should rename it to overlay ?

@07akioni
Copy link

I my memory, antd side always use overlay to indicate the content of a pop element. should it be just overlay?

yes , I should rename it to overlay ?

yes, I think overlay is better.

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 13, 2020

I my memory, antd side always use overlay to indicate the content of a pop element. should it be just overlay?

yes , I should rename it to overlay ?

yes, I think overlay is better.

Thank you very much for your guidance. rename it to overlay.

@jhoneybee jhoneybee changed the title feat: add wrapRenderer feat: add overlay Aug 13, 2020
@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 13, 2020

@afc163
暗中观察
可以帮我看一下这个PR吗? 如果方便的话,我想在antd v4 上加入这个特性。 (/ω\)

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 17, 2020

看着你

@afc163 那个..... 可以帮我检查一下PR 吗?, 如果不忙的话。

src/Dialog.tsx Outdated Show resolved Hide resolved
src/Dialog.tsx Outdated Show resolved Hide resolved
src/Dialog.tsx Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Aug 17, 2020

是否可以直接 modalRender or modalComponent? overlay 这个词其实不是 rc-componentantd 的 naming standard

@jhoneybee jhoneybee changed the title feat: add overlay feat: add modalRender Aug 18, 2020
@jhoneybee
Copy link
Contributor Author

是否可以直接 modalRender or modalComponent? overlay 这个词其实不是 rc-componentantd 的 naming standard

好的,已经调整了。

src/IDialogPropTypes.tsx Outdated Show resolved Hide resolved
@jhoneybee
Copy link
Contributor Author

@07akioni 已经调整为 { className: string, children: React.ReactNode }

卖萌的肯定

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 18, 2020

最棒了

@zombieJ 能帮我看一下? 我已经调整了。

src/Dialog.tsx Outdated Show resolved Hide resolved
src/IDialogPropTypes.tsx Outdated Show resolved Hide resolved
@vercel
Copy link

vercel bot commented Aug 19, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/dialog/gdwp403i2
✅ Preview: https://dialog-git-fork-jhoneybee-master.react-component.vercel.app

@jhoneybee jhoneybee changed the title fate: add modalRender WIP fate: add modalRender Aug 29, 2020
@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 29, 2020

git push -f

好了,已经调整了。非常抱歉,之前对rebase命令使用的少 (/ω\)。

tests/index.spec.js Outdated Show resolved Hide resolved
test: 添加的测试用例

fix
@xrkffgg
Copy link
Member

xrkffgg commented Aug 29, 2020

不用每次都 force push 的,就 rebase 或者 merge 后 比较好,其他时候可以保留 commit 信息

tests/index.spec.js Outdated Show resolved Hide resolved
@jhoneybee
Copy link
Contributor Author

不用每次都 force push 的,就 rebase 或者 merge 后 比较好,其他时候可以保留 commit 信息

好的,已经调整,感谢指导 ~

@jhoneybee jhoneybee requested a review from xrkffgg August 31, 2020 01:17
src/Dialog.tsx Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Aug 31, 2020

example 里加一个拖拽的例子吧~

@jhoneybee
Copy link
Contributor Author

jhoneybee commented Aug 31, 2020

example 里加一个拖拽的例子吧~

好的, 已经补充例子了 。

地址: https://dialog-git-fork-jhoneybee-master.react-component.vercel.app/?path=/story/rc-dialog--draggable

@zombieJ
Copy link
Member

zombieJ commented Aug 31, 2020

+ rc-dialog@8.3.0

antd 的 feature 分支也需要更新一下 @jhoneybee

@jhoneybee
Copy link
Contributor Author

+ rc-dialog@8.3.0

antd 的 feature 分支也需要更新一下 @jhoneybee

好的。 马上

@jhoneybee jhoneybee changed the title fate: add modalRender feat: add modalRender Sep 1, 2020
This was referenced Sep 1, 2020
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.

6 participants