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

docs: documents can be converted to data #2734

Merged
merged 13 commits into from
Jan 10, 2019
Merged

docs: documents can be converted to data #2734

merged 13 commits into from
Jan 10, 2019

Conversation

cipchk
Copy link
Member

@cipchk cipchk commented Jan 3, 2019

规则

  • 使用【|】中文竖线符,表示 Union Types
    • 例如:【有四种选择 successinfowarningerror在【类型列】表示【'success'|'info'|'warning'|'error'
  • 【参数列】
    • 保持纯粹性
      • 例如:【[nzValidateStatus](Reactive Forms)】在【说明列】统一描述
  • 【类型列】
    • 包含【``】代码包裹(保护 TemplateRef<void> 的有效性)
  • 【默认值列】
    • 保持纯粹性
      • 例如:【infobanner 模式下默认值为 warning把额外描述放置【说明列】
    • 无默认值时使用【-】替代,“无”应替代成【-】
  • 站点样式:强制移除【类型列】所有 code 样式

完整示例

参数 说明 类型 默认值
[nzBanner] 是否用作顶部公告 boolean false
[nzCloseText] 自定义关闭按钮 string|TemplateRef<void> -
[nzShowIcon] 是否显示辅助图标,nzBanner 模式下默认值为 true boolean false
[nzType] 指定警告提示的样式,nzBanner 模式下默认值为 warning 'success'丨'info'丨'warning'丨'error' 'info'
[nzValidateStatus] (Reactive Forms)会根据 FormControl 的状态自动生成校验状态 FormControl丨FormControlName nz-form-control 中包裹的第一个 FormControl
[nzValidateStatus] (Template-driven Forms)校验状态 'success'丨'warning'丨'error'丨'validating' -

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

- 使用【|】中文竖线符,表示 Union Types
    - 例如:【有四种选择 `success`、`info`、`warning`、`error`】**应**在【类型列】表示【`success|info|warning|error`】
- 【参数列】
    - 保持纯粹性
        - 例如:【`[nzValidateStatus]`(Reactive Forms)】**应**在【说明列】统一描述
- 【类型列】
    - **应**包含【``】代码包裹(保护 `TemplateRef<void>` 的有效性)
- 【默认值列】
    - 保持纯粹性
        - 例如:【`info`,`banner` 模式下默认值为 `warning`】**应**把额外描述放置【说明列】
    - 无默认值时**应**使用【-】替代,“无”应替代成【-】
- 站点样式:强制移除【类型列】所有 `code` 样式

## 完整示例

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzBanner]` | 是否用作顶部公告 | `boolean` | `false` |
| `[nzCloseText]` | 自定义关闭按钮 | `string|TemplateRef<void>` | - |
| `[nzShowIcon]` | 是否显示辅助图标,`nzBanner` 模式下默认值为 `true` | `boolean` | `false` |
| `[nzType]` | 指定警告提示的样式,`nzBanner` 模式下默认值为 `warning` | `success丨info丨warning丨error` | `info` |
| `[nzValidateStatus]` | (Reactive Forms)会根据 FormControl 的状态自动生成校验状态 | `FormControl丨FormControlName` | `nz-form-control` 中包裹的第一个 `FormControl`  |
| `[nzValidateStatus]` | (Template-driven Forms)校验状态 | `success丨warning丨error丨validating` | - |
@cipchk cipchk changed the title docs: documents can be converted to data WIP: docs: documents can be converted to data Jan 3, 2019
@netlify
Copy link

netlify bot commented Jan 3, 2019

Deploy preview for ng-zorro-master ready!

Built with commit a38c346

https://deploy-preview-2734--ng-zorro-master.netlify.com

@codecov
Copy link

codecov bot commented Jan 3, 2019

Codecov Report

Merging #2734 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2734   +/-   ##
=======================================
  Coverage   95.57%   95.57%           
=======================================
  Files         515      515           
  Lines       12191    12191           
  Branches     1711     1711           
=======================================
  Hits        11652    11652           
  Misses        173      173           
  Partials      366      366

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 8906dff...a38c346. Read the comment docs.

@vthinkxie
Copy link
Member

强制移除【类型列】所有 code 样式,这句话怎么理解?

@cipchk
Copy link
Member Author

cipchk commented Jan 3, 2019

@vthinkxie
asdf

@cipchk
Copy link
Member Author

cipchk commented Jan 3, 2019

对于字串符型Union Types的表示是否有必要增加单引号标识:

success丨warning丨error丨validating

'success'丨'warning'丨'error'丨'validating'

@vthinkxie
Copy link
Member

vthinkxie commented Jan 3, 2019

移除后应该是 stringTemplateRef<void> 还是 string|TemplateRef<void>?

@cipchk
Copy link
Member Author

cipchk commented Jan 3, 2019

移除后应该是 stringTemplateRef<void> 还是 string|TemplateRef<void>?

我觉得二者都适应;但尽可能使用后者因为对于 Union Types 来说算是一体的。

@hsuanxyz
Copy link
Member

hsuanxyz commented Jan 3, 2019

对于字串符型Union Types的表示是否有必要增加单引号标识:

success丨warning丨error丨validating

'success'丨'warning'丨'error'丨'validating'

我认为应该加单引号

@hsuanxyz
Copy link
Member

hsuanxyz commented Jan 3, 2019

英文描述的首字母是否需要大写?现在的文档没有统一

@vthinkxie
Copy link
Member

vthinkxie commented Jan 3, 2019

Description 部分的英文首字母这次先不调整好了,不影响解析
采用 string|TemplateRef<void> 方式
Union Types 采用

'success'丨'warning'丨'error'丨'validating'

其他的都没有问题 @cipchk

@cipchk cipchk changed the title WIP: docs: documents can be converted to data docs: documents can be converted to data Jan 4, 2019
@wzhudev
Copy link
Member

wzhudev commented Jan 7, 2019

有些方法存在返回, 如果没有返回应当如何处理, - 还是 void, 还是将返回字段留空? @cipchk

@cipchk
Copy link
Member Author

cipchk commented Jan 7, 2019

有些方法存在返回, 如果没有返回应当如何处理, - 还是 void, 还是将返回字段留空? @cipchk

建议使用 void 更好一点;- 仅在组件属性中体现。

@vthinkxie
Copy link
Member

Hi, @cipchk plz rebase master

@cipchk
Copy link
Member Author

cipchk commented Jan 9, 2019

Hi, @cipchk plz rebase master

done

Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

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

LGTM

@vthinkxie vthinkxie merged commit e74acfc into NG-ZORRO:master Jan 10, 2019
@vthinkxie
Copy link
Member

@cipchk it would be better to add ci and contributor's doc to verify every commit to avoid break this.

Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
* docs: documents can be converted to data

- 使用【|】中文竖线符,表示 Union Types
    - 例如:【有四种选择 `success`、`info`、`warning`、`error`】**应**在【类型列】表示【`success|info|warning|error`】
- 【参数列】
    - 保持纯粹性
        - 例如:【`[nzValidateStatus]`(Reactive Forms)】**应**在【说明列】统一描述
- 【类型列】
    - **应**包含【``】代码包裹(保护 `TemplateRef<void>` 的有效性)
- 【默认值列】
    - 保持纯粹性
        - 例如:【`info`,`banner` 模式下默认值为 `warning`】**应**把额外描述放置【说明列】
    - 无默认值时**应**使用【-】替代,“无”应替代成【-】
- 站点样式:强制移除【类型列】所有 `code` 样式

## 完整示例

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzBanner]` | 是否用作顶部公告 | `boolean` | `false` |
| `[nzCloseText]` | 自定义关闭按钮 | `string|TemplateRef<void>` | - |
| `[nzShowIcon]` | 是否显示辅助图标,`nzBanner` 模式下默认值为 `true` | `boolean` | `false` |
| `[nzType]` | 指定警告提示的样式,`nzBanner` 模式下默认值为 `warning` | `success丨info丨warning丨error` | `info` |
| `[nzValidateStatus]` | (Reactive Forms)会根据 FormControl 的状态自动生成校验状态 | `FormControl丨FormControlName` | `nz-form-control` 中包裹的第一个 `FormControl`  |
| `[nzValidateStatus]` | (Template-driven Forms)校验状态 | `success丨warning丨error丨validating` | - |

* chore: remove code style in Type column

* docs: fix missing & losing component name

* docs: update all

* chore: remove type and default column  code style

* chore: 移除中文竖线,全部使用英文全角坚线

* chore: 修正不同组件之间相互引用相同属性

* chore: fix losing nz-popover in english

* docs: remove 'or'
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* docs: documents can be converted to data

- 使用【|】中文竖线符,表示 Union Types
    - 例如:【有四种选择 `success`、`info`、`warning`、`error`】**应**在【类型列】表示【`success|info|warning|error`】
- 【参数列】
    - 保持纯粹性
        - 例如:【`[nzValidateStatus]`(Reactive Forms)】**应**在【说明列】统一描述
- 【类型列】
    - **应**包含【``】代码包裹(保护 `TemplateRef<void>` 的有效性)
- 【默认值列】
    - 保持纯粹性
        - 例如:【`info`,`banner` 模式下默认值为 `warning`】**应**把额外描述放置【说明列】
    - 无默认值时**应**使用【-】替代,“无”应替代成【-】
- 站点样式:强制移除【类型列】所有 `code` 样式

## 完整示例

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzBanner]` | 是否用作顶部公告 | `boolean` | `false` |
| `[nzCloseText]` | 自定义关闭按钮 | `string|TemplateRef<void>` | - |
| `[nzShowIcon]` | 是否显示辅助图标,`nzBanner` 模式下默认值为 `true` | `boolean` | `false` |
| `[nzType]` | 指定警告提示的样式,`nzBanner` 模式下默认值为 `warning` | `success丨info丨warning丨error` | `info` |
| `[nzValidateStatus]` | (Reactive Forms)会根据 FormControl 的状态自动生成校验状态 | `FormControl丨FormControlName` | `nz-form-control` 中包裹的第一个 `FormControl`  |
| `[nzValidateStatus]` | (Template-driven Forms)校验状态 | `success丨warning丨error丨validating` | - |

* chore: remove code style in Type column

* docs: fix missing & losing component name

* docs: update all

* chore: remove type and default column  code style

* chore: 移除中文竖线,全部使用英文全角坚线

* chore: 修正不同组件之间相互引用相同属性

* chore: fix losing nz-popover in english

* docs: remove 'or'
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.

4 participants