-
Notifications
You must be signed in to change notification settings - Fork 4k
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(module:space): add space compact component #8755
Conversation
This preview will be available after the AzureCI is passed. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8755 +/- ##
==========================================
+ Coverage 91.86% 91.91% +0.04%
==========================================
Files 541 546 +5
Lines 19142 19353 +211
Branches 2823 2858 +35
==========================================
+ Hits 17585 17788 +203
- Misses 1245 1253 +8
Partials 312 312 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
af22715
to
3c1cbd5
Compare
222eac7
to
9b8a439
Compare
2749246
to
0fa6380
Compare
f394e1f
to
ac6e8c2
Compare
@@ -5,5 +5,6 @@ | |||
|
|||
// TODO: replace other size with this type. | |||
export type NzSizeLDSType = 'large' | 'default' | 'small'; | |||
export type NzSizeLMSType = 'large' | 'middle' | 'small'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
值得注意的是,space compact size 原本应该使用 NzSizeLMSType 类型,但是我最后选择使用 NzSizeLDSType,因为 zorro 的其他 compact 子组件均使用的是 NzSizeLDSType 类型,如果要改为 NzSizeLMSType,那会造成不小的 breaking changes。
) {} | ||
|
||
ngOnInit(): void { | ||
this.size.set(this.nzSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处用于同步来自 @WithConfig 第一次设置的值
ac6e8c2
to
75936d4
Compare
f526466
to
1b7dc46
Compare
@@ -13,7 +13,7 @@ | |||
|
|||
// Special styles for Primary Button | |||
&-compact-item.@{btn-prefix-cls}-primary { | |||
&:not([disabled]) + &:not([disabled]) { | |||
&:not([disabled]) + &:not([disabled]):not([ant-click-animating-without-extra-node='true']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -69,7 +69,7 @@ | |||
// Special styles for Primary Button | |||
&-compact-vertical-item { | |||
&.@{btn-prefix-cls}-primary { | |||
&:not([disabled]) + &:not([disabled]) { | |||
&:not([disabled]) + &:not([disabled]):not([ant-click-animating-without-extra-node='true']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
47fb7cb
to
be82f45
Compare
be82f45
to
847cebb
Compare
847cebb
to
6379b43
Compare
@@ -37,7 +38,7 @@ const SPACE_SIZE: { | |||
|
|||
@Component({ | |||
selector: 'nz-space, [nz-space]', | |||
exportAs: 'NzSpace', | |||
exportAs: 'nzSpace', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉算是个破坏性更新,用户需要改变使用的名称(虽然不知道有没有用户这么用)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
属于影响范围较小的破坏性更新,到时候在变更日志中说明就好了👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
[RFC] New component Space.Compact
What is the new behavior?
基础用法:
根据 RFC,该组件能够替代
input-group
和button-group
组件:button-group
组件,v20 完全删除button-group
组件。input-group
实现还承担了 addon,affix 的功能,因此不会弃用,仅弃用 输入框组合 的用法,包括nzCompact
属性。input-number
组件,弃用input-number-group
组件,并将它的 addon,affix 功能集成到input-number
组件上Does this PR introduce a breaking change?
NzSpaceComponent 的导出名称从
NzSpace
更新为规范化的nzSpace
(考虑通过 schematics 帮用户自动更新)
Other information