-
-
Notifications
You must be signed in to change notification settings - Fork 50.3k
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
docs: 🌈 Add Components overview page #24491
Conversation
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.
Could you please add tests to make sure this change works as expected?
@@ -3,6 +3,7 @@ category: Components | |||
type: 通用 | |||
title: Button | |||
subtitle: 按钮 | |||
cover: https://gw.alipayobjects.com/zos/antfincdn/qZWIjVIkQ7/Button.svg |
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.
卡片封面图片在这里设置。
site/theme/static/overview.less
Outdated
@@ -0,0 +1,3 @@ | |||
.components-overview { | |||
padding: 0; | |||
} |
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.
样式可以写在这里。
Codecov Report
@@ Coverage Diff @@
## master #24491 +/- ##
==========================================
- Coverage 99.17% 99.10% -0.08%
==========================================
Files 362 363 +1
Lines 7291 7230 -61
Branches 2034 2013 -21
==========================================
- Hits 7231 7165 -66
- Misses 60 65 +5
Continue to review full report at Codecov.
|
12f350f
to
1d927df
Compare
This pull request introduces 1 alert when merging a63985a into 89d7101 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging be392ea into 11bbd72 - view on LGTM.com new alerts:
|
👌
👌
加了的,可能速度有点快(0.1s),我改慢点吧(0.3s)
居左比较符合习惯吧,而且这样给右边预留了一些操作可能性,例如「预览」按钮,点击后出一个 Modal 或 Popover 预览组件。(怎么实现比较省事还没想好)
👌
👌
芮晗给的源文件里有些是位图,没法出svg,这个需要重新做下,要再花点时间弄
👌 |
是给图片加 skeleton 吗? |
https://preview-24491-ant-design.surge.sh/components/overview-cn/ 这个页面刷新一下,看看数据没加载之前的样子。 |
site/theme/template/utils.tsx
Outdated
@@ -1,6 +1,6 @@ | |||
import flattenDeep from 'lodash/flattenDeep'; | |||
import flatten from 'lodash/flatten'; | |||
import themeConfig from '../../../site/themeConfig'; | |||
import themeConfig from "../../themeConfig"; |
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.
import themeConfig from "../../themeConfig"; | |
import themeConfig from '../../themeConfig'; |
<Link to={getLocalizedPathname(url, locale === 'zh-CN')}> | ||
<Card | ||
size="small" | ||
className="card" |
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.
这些类名容易冲突,加 components-overview
前缀吧。
site/bisheng.config.js
Outdated
// '0.10.x': 'http://010x.ant.design', | ||
// '0.9.x': 'http://09x.ant.design', | ||
// }, | ||
// }, |
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.
别注释,直接删掉。
import { Divider, Row, Col, Card, Typography, Skeleton } from 'antd'; | ||
import { getChildren } from 'jsonml.js/lib/utils'; | ||
import { getMetaDescription, getLocalizedPathname, getThemeConfig } from '../utils'; | ||
import * as utils from '../utils'; |
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.
这两行 import 可以合并。
site/theme/static/overview.less
Outdated
transition: all @animation-duration-base @ease-in-out; | ||
&:hover { | ||
box-shadow: @shadow-1-down; | ||
.components-overview- { |
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.
.components-overview {
&-title {}
}
这样写么。
0ce7fd4
to
7663951
Compare
/rebase |
e8583a7
to
f0d06c7
Compare
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
本地访问 http://127.0.0.1:8001/components/overview/ 和 http://127.0.0.1:8001/components/overview-cn/ 进行调试。
可参考:
📝 Changelog
☑️ Self Check before Merge
View rendered README-pt_BR.md
View rendered README-zh_CN.md
View rendered README.md
View rendered components/button/index.en-US.md
View rendered components/button/index.zh-CN.md
View rendered components/overview/index.md
View rendered docs/react/introduce.en-US.md
View rendered docs/react/introduce.zh-CN.md