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

Timeline design change feature #11490

Merged
merged 6 commits into from Jul 31, 2018
Merged

Conversation

jrvboesch
Copy link
Contributor

added a new prop to timeline called mode where you can send 'alternate' to change the timeline design and 'right' to flip horizontally.

added a new prop to timeline called mode where you can send 'alternate' to change the timeline design and 'right' to flip horizontally.
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 27, 2018

Deploy preview for ant-design ready!

Built with commit 603ab8a

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

@afc163
Copy link
Member

afc163 commented Jul 30, 2018

The demo seems to overflow, could you optimize it?

image

...restProps
} = this.props;
const pendingNode = typeof pending === 'boolean' ? null : pending;
const classString = classNames(prefixCls, {
[`${prefixCls}-pending`]: !!pending,
[`${prefixCls}-reverse`]: !!reverse,
}, className);
}, className,
mode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className ${prefixCls}-${mode} is prefered.

---
order: 3
title:
zh-CN: 基本用法
Copy link
Member

@afc163 afc163 Jul 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use 交替展现 as chinese title.


## zh-CN

基本的时间轴。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use 内容在时间轴两侧轮流出现。 as chinese description.

---
order: 4
title:
zh-CN: 自定义时间轴点
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use 右侧时间轴点 as chinese title.


## zh-CN

可以设置为图标或其他自定义元素。
Copy link
Member

@afc163 afc163 Jul 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use 时间轴点可以在内容的右边。 as chinese description.

@codecov
Copy link

codecov bot commented Jul 30, 2018

Codecov Report

Merging #11490 into feature-3.8.0 will increase coverage by 0.49%.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                @@
##           feature-3.8.0   #11490      +/-   ##
=================================================
+ Coverage          91.87%   92.37%   +0.49%     
=================================================
  Files                199      199              
  Lines               5061     5521     +460     
  Branches            1416     1611     +195     
=================================================
+ Hits                4650     5100     +450     
- Misses               405      416      +11     
+ Partials               6        5       -1
Impacted Files Coverage Δ
components/timeline/Timeline.tsx 100% <100%> (ø) ⬆️
components/date-picker/wrapPicker.tsx 100% <0%> (ø) ⬆️
components/pagination/Pagination.tsx 100% <0%> (ø) ⬆️
components/time-picker/index.tsx 74.5% <0%> (ø) ⬆️
components/tree/Tree.tsx 100% <0%> (ø) ⬆️
components/transfer/index.tsx 87.41% <0%> (ø) ⬆️
components/select/index.tsx 100% <0%> (ø) ⬆️
components/date-picker/createPicker.tsx 97.05% <0%> (+0.18%) ⬆️
components/tree/DirectoryTree.tsx 91.12% <0%> (+0.32%) ⬆️
components/date-picker/RangePicker.tsx 95.57% <0%> (+0.47%) ⬆️
... and 7 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 6199340...603ab8a. Read the comment docs.

@@ -109,7 +109,7 @@ exports[`renders ./components/timeline/demo/alternate.md correctly 1`] = `

exports[`renders ./components/timeline/demo/basic.md correctly 1`] = `
<ul
class="ant-timeline"
class="ant-timeline ant-timeline-"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

@@ -32,6 +32,7 @@ title: Timeline
| pending | 指定最后一个幽灵节点是否存在或内容 | boolean\|string\|ReactNode | false |
| pendingDot | 当最后一个幽灵节点存在時,指定其时间图点 | \|string\|ReactNode | `<Icon type="loading" />` |
| reverse | 节点排序 | boolean | false |
| mode | By sending `alternate` the timeline will distribute the nodes to the left and right. | `standard` \| `alternate` | `standard` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two standard should be left and right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And chinese goes to

通过设置 `mode` 可以改变时间轴和内容的相对位置

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow sorry, bad copy & paste.

@afc163
Copy link
Member

afc163 commented Jul 31, 2018

@jrvboesch Nice job!!! 😀

@afc163 afc163 merged commit f4d631d into ant-design:feature-3.8.0 Jul 31, 2018
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.

None yet

3 participants