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
New Component PageHeader #13637
New Component PageHeader #13637
Conversation
Codecov Report
@@ Coverage Diff @@
## feature #13637 +/- ##
========================================
Coverage 93.97% 93.97%
========================================
Files 314 314
Lines 6939 6939
Branches 1759 1759
========================================
Hits 6521 6521
Misses 404 404
Partials 14 14 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## feature #13637 +/- ##
========================================
Coverage 93.97% 93.97%
========================================
Files 314 314
Lines 6939 6939
Branches 1759 1759
========================================
Hits 6521 6521
Misses 404 404
Partials 14 14 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## feature #13637 +/- ##
===========================================
+ Coverage 93.08% 93.16% +0.08%
===========================================
Files 247 248 +1
Lines 6635 6670 +35
Branches 1940 1928 -12
===========================================
+ Hits 6176 6214 +38
+ Misses 456 455 -1
+ Partials 3 1 -2
Continue to review full report at Codecov.
|
或者 下方的操作和标签移到 |
问一个问题,这个不做在 ant-design-pro 里面?我们按照什么标准来划定一个组件是在 antd 还是再 ant-design-pro 里面呢? |
扭头问一下你左边的男人 |
components/page-header/demo/basic.md
Outdated
<style> | ||
.ant-pageheader{ | ||
border: 1px solid rgb(235, 237, 240); | ||
} |
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.
indent 和 space 不对。
| action | Operating area, at the end of the line of the title line | ReactNode | - | | ||
| logo | logo | ReactNode | - | | ||
| content | content | ReactNode | - | | ||
| extraContent | Extra content area, on the right side of content | ReactNode | - | |
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.
extraContent 和 action 的命名还是太不直观了。
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.
action 感觉还不错,extraContent的确感觉有点扯。
不如叫 rightContent 和 leftContent 吧
extraContent 去掉好了,感觉用的很少。 |
Card 里右上角叫 extra,这边也这么叫吧。叫 action 又要多记一个。 |
extraContent 或者让用户自己用 Flex 去实现? ============= update: |
components/page-header/demo/basic.md
Outdated
@@ -14,13 +14,16 @@ title: | |||
Basic Page Header | |||
|
|||
```jsx | |||
import { PageHeader } from 'antd'; | |||
import { PageHeader } from "antd"; |
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.
应该是单引号。
884cae4
to
adda0a3
Compare
components/page-header/index.tsx
Outdated
if (breadcrumb && breadcrumb.routes && breadcrumb.routes.length > 2) { | ||
return this.renderBreadcrumb(); | ||
} | ||
return this.renderBack(prefixCls); |
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.
renderBack 可以不出现么?感觉很多场景不需要返回。
components/page-header/demo/basic.md
Outdated
@@ -7,11 +7,11 @@ title: | |||
|
|||
## zh-CN | |||
|
|||
标准页头 | |||
标准页头,适合使用在需要简单描述的场景 |
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.
标点符号
expect(wrapper.find('.ant-page-header-back-icon')).toHaveLength(0); | ||
}); | ||
|
||
it('pageHeader should contain back it back', async () => { |
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.
目测用例都不需要 async。
这个晚点合,等 Paragraph 好了用它代替 p。 |
padding-bottom: 8px; | ||
white-space: nowrap; | ||
line-height: 20px; | ||
} |
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.
这些 css 多余了吧。
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.
Description 直接用新的 Descriptions 吧,这里代码好冗余。
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.
我想的是先把他弄出去,众测一波,不知道api 设计的合不合理
预览链接在哪里。 |
CI 修一下,准备合了 |
New Component
Preview
Impact on users and possible risks
Add new components without affecting existing code.
changelog
add new components PageHeader
request a self-check list before merging