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: Form & ConfigProvider support component size #20570

Merged
merged 10 commits into from
Jan 3, 2020
Merged

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Dec 31, 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?)

🔗 Related issue link

close #17570
close #20174

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Form & ConfigProvider support component size
🇨🇳 Chinese

☑️ 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/config-provider/demo/size.md
View rendered components/config-provider/index.en-US.md
View rendered components/config-provider/index.zh-CN.md
View rendered components/form/demo/size.md
View rendered components/form/index.en-US.md
View rendered components/form/index.zh-CN.md

@netlify
Copy link

netlify bot commented Dec 31, 2019

Deploy preview for ant-design ready!

Built with commit 2b229d9

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

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a7a879a:

Sandbox Source
antd reproduction template Configuration

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 995a8ae:

Sandbox Source
antd reproduction template Configuration

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 31, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2b229d9:

Sandbox Source
antd reproduction template Configuration

@afc163
Copy link
Member

afc163 commented Dec 31, 2019

感觉会和 #19380 有大量冲突,最好把 #19380 合并了再由我们自己在这个 PR 里解决冲突。

@codecov
Copy link

codecov bot commented Jan 2, 2020

Codecov Report

Merging #20570 into 4.0-prepare will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           4.0-prepare   #20570      +/-   ##
===============================================
+ Coverage        97.54%   97.56%   +0.01%     
===============================================
  Files              294      295       +1     
  Lines             6766     6805      +39     
  Branches          1865     1841      -24     
===============================================
+ Hits              6600     6639      +39     
  Misses             166      166
Impacted Files Coverage Δ
components/form/Form.tsx 100% <ø> (ø) ⬆️
components/button/index.tsx 100% <ø> (ø) ⬆️
components/button/button-group.tsx 100% <ø> (ø) ⬆️
components/input/ClearableLabeledInput.tsx 100% <ø> (ø) ⬆️
components/table/Table.tsx 96.61% <100%> (+0.05%) ⬆️
components/config-provider/index.tsx 91.66% <100%> (ø) ⬆️
components/tree-select/index.tsx 97.72% <100%> (+0.29%) ⬆️
components/select/index.tsx 97.61% <100%> (+0.18%) ⬆️
components/date-picker/generatePicker.tsx 97.02% <100%> (+0.09%) ⬆️
components/button/button.tsx 100% <100%> (ø) ⬆️
... and 12 more

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 9913f99...2b229d9. Read the comment docs.

@zombieJ zombieJ marked this pull request as ready for review January 2, 2020 15:14
@zombieJ zombieJ requested a review from afc163 January 2, 2020 15:14
@zombieJ
Copy link
Member Author

zombieJ commented Jan 2, 2020

Merge 4.0-prepare. Please help to check.

@afc163
Copy link
Member

afc163 commented Jan 3, 2020

Table 和 Card 要不要支持一下,不过要注意这两默认大小情况不太一样。

@zombieJ
Copy link
Member Author

zombieJ commented Jan 3, 2020

Card 可以,和 Switch 一样只有 defaultsmall。Table 的话比较蛋疼,默认就是 large。如果是这样的话,那 componentSize 就不是 large | default | small。而是 large | 'middle' | 'small'。默认什么都不填,跟着组件自己走。如果设置了就跟着设置走,即 size='middle' 的时候,设置 Table 也为 middle。这样如何?

@afc163
Copy link
Member

afc163 commented Jan 3, 2020

如果设置了就跟着设置走,即 size='middle' 的时候,设置 Table 也为 middle。这样如何?

是这样的。

@afc163
Copy link
Member

afc163 commented Jan 3, 2020

will close #20174 too

@zombieJ zombieJ merged commit 5ebac5f into 4.0-prepare Jan 3, 2020
@zombieJ zombieJ deleted the form-sizing branch January 3, 2020 05:38
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.

2 participants