Skip to content

Commit

Permalink
feat: rebase feature
Browse files Browse the repository at this point in the history
  • Loading branch information
heiyu4585 committed Nov 19, 2022
2 parents 40e83ca + 453cd0f commit 5a2e562
Show file tree
Hide file tree
Showing 19 changed files with 531 additions and 123 deletions.
99 changes: 99 additions & 0 deletions .github/ISSUE_TEMPLATE/template-1-bug-report.yml.close
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: 🇨🇳 报告缺陷(beta)
description: 使用中文 Bug 报告模板提交一个缺陷,当然你也可以用 https://new-issue.ant.design
title: "[Bug] 请替换成合适的标题"
labels: ["🐛+Bug"]
body:
- type: markdown
attributes:
value: |
除了此表单,你也可以使用 [Ant Design Issue Helper](https://new-issue.ant.design/) 来新建 issue。

Ant Design 的 issue 列表只接受 [Bug 报告](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%90%9B+Bug&template=template-1-bug-report.yml&title=%5BBug%5D+) 或是 [新功能请求](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%92%A1%2BFeature%2BRequest&template=template-2-feature-request.yml&title=%5BFeature+Request%5D+) (Feature Request)。这意味着我们不接受用法问题(How to 类问题)。如果你开的 issue 不符合规定,它将会被立刻关闭。[为什么要这么严格?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/introModal.md)

对于使用中遇到的问题,请使用以下资源:

- 将用法类问题发到 [GitHub 讨论区](https://github.com/ant-design/ant-design/discussions) 而不是 Issue。
- 仔细阅读 [使用文档](https://ant.design/docs/react/introduce-cn) 和 [组件文档](https://ant.design/components/overview-cn/)。
- 提问前确保你在 [常见问题](https://ant.design/docs/react/faq-cn) 和 [更新日志](https://ant.design/changelog-cn) 中搜索过。
- 在 [StackOverflow](https://stackoverflow.com/questions/tagged/antd) (英文) 或是 [SegmentFault](https://segmentfault.com/t/antd)(中文)搜索和提问。

最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。

---
- type: input
id: reproduce
attributes:
label: 重现链接
description: 请提供一个尽可能精简的 [codesandbox](https://u.ant.design/codesandbox-repro) 或 [GitHub 仓库](https://github.com/ant-design/create-react-app-antd/) 的链接。[什么是最小化重现,为什么这是必需的?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/reproModal.md)
validations:
required: true
- type: input
id: version
attributes:
label: antd 版本
description: 你正在使用的 antd 版本是多少?(注意不是 package.json 里的版本,而是 node_modules/antd 里实际安装的版本)
placeholder: 如 4.16.13
validations:
required: true
- type: textarea
id: reproduce-steps
attributes:
label: 重现步骤
description: 请提供一个傻瓜式的操作步骤,方便我们无脑重现问题。
placeholder: |
比如:
1. 点击重现链接里的主按钮
2. 等待五秒钟
3. 观察按钮的边框
validations:
required: true
- type: textarea
id: expected
attributes:
label: 期望的结果是什么?
placeholder: 比如:按钮样式正常,边框一直存在
validations:
required: true
- type: textarea
id: reality
attributes:
label: 实际的结果是什么?
placeholder: 比如:按钮样式异常,边框突然丢失
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: 浏览器
description: 在哪些浏览器上能重现这个问题?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Edge
- Internet Explorer
- Others
- type: input
id: browsers-version
attributes:
label: 浏览器版本
placeholder: 如:版本 95.0.4638.69(正式版本) (x86_64)
- type: dropdown
id: os
attributes:
label: 操作系统
description: 使用的操作系统是?
options:
- Windows
- MacOS
- iOS
- Android
- Others
- type: input
id: hidden-tag
attributes:
label: 其他
description: 不要删除预填内容,否则 issue 会被自动关闭。
value: <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/template-2-feature-request.yml.close
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 🇨🇳 功能需求(beta)
description: 使用中文 Bug 报告模板提交一个功能需求,当然你也可以用 https://new-issue.ant.design
title: "[Feature Request] 请替换成合适的标题"
labels: ["💡+Feature+Request"]
body:
- type: markdown
attributes:
value: |
除了此表单,你也可以使用 [Ant Design Issue Helper](https://new-issue.ant.design/) 来新建 issue。

Ant Design 的 issue 列表只接受 [Bug 报告](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%90%9B+Bug&template=template-1-bug-report.yml&title=%5BBug%5D+) 或是 [新功能请求](https://github.com/ant-design/ant-design/issues/new?assignees=&labels=%F0%9F%92%A1%2BFeature%2BRequest&template=template-2-feature-request.yml&title=%5BFeature+Request%5D+) (Feature Request)。这意味着我们不接受用法问题(How to 类问题)。如果你开的 issue 不符合规定,它将会被立刻关闭。[为什么要这么严格?](https://github.com/ant-design/antd-issue-helper/blob/master/src/locales/zh/introModal.md)

对于使用中遇到的问题,请使用以下资源:

- 将用法类问题发到 [GitHub 讨论区](https://github.com/ant-design/ant-design/discussions) 而不是 Issue。
- 仔细阅读 [使用文档](https://ant.design/docs/react/introduce-cn) 和 [组件文档](https://ant.design/components/overview-cn/)。
- 提问前确保你在 [常见问题](https://ant.design/docs/react/faq-cn) 和 [更新日志](https://ant.design/changelog-cn) 中搜索过。
- 在 [StackOverflow](https://stackoverflow.com/questions/tagged/antd) (英文) 或是 [SegmentFault](https://segmentfault.com/t/antd)(中文)搜索和提问。

最后,在开 issue 前,可以先搜索一下以往的旧 issue - 你遇到的问题可能已经有人提了,也可能已经在最新版本中被修正。注意:如果你发现一个已经关闭的旧 issue 在最新版本中仍然存在,请不要在旧 issue 下面留言,而应该用下面的表单开一个新的 issue。

---
- type: textarea
id: needs
attributes:
label: 这个功能解决了什么问题?
description: |
请尽可能详尽地说明这个需求的用例和场景。最重要的是:解释清楚是怎样的用户体验需求催生了这个功能上的需求。
Ant Design 的一个重要设计原则是保持 API 的简洁和直接。通常来说,我们只考虑添加在现有的 API 下无法轻松实现的功能。新功能的用例也应当足够常见。
validations:
required: true
- type: textarea
id: api
attributes:
label: 你期望的 API 是怎样的?
description: |
描述一下你期望这个新功能的 API 是如何使用的,并提供一些代码示例。请用 Markdown 格式化你的代码片段。
如果有新的 UI 界面,最好截图展示你期望的界面是什么样的?
placeholder: |
```jsx
<Drawer extra={<Button />} {...props} />
```
validations:
required: true
- type: input
id: hidden-tag
attributes:
label: 其他
description: 不要删除预填内容,否则 issue 会被自动关闭。
value: <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
4 changes: 2 additions & 2 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking codesandbox of [antd@5.x](https://u.ant.design/codesandbox-repro) or [antd@4.x](https://u.ant.design/codesandbox-repro-4x), or provide a minimal GitHub repository. Issues labeled by `Need Reproduce` will be closed if no activities in 3 days.
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by `Need Reproduce` will be closed if no activities in 3 days.
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 [antd@5.x](https://u.ant.design/codesandbox-repro) 或 [antd@4.x](https://u.ant.design/codesandbox-repro-4x) 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://u.ant.design/codesandbox-repro) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
![](https://gw.alipayobjects.com/zos/antfincdn/y9kwg7DVCd/reproduce.gif)
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/issue-open-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ jobs:
* Ant Motion: https://motion.ant.design
## 国内镜像
* 官方镜像: https://ant-design.antgroup.com
* 官方镜像: https://ant-design.antgroup.com/
* Gitee 镜像: http://ant-design.gitee.io
* Ant Design 4.x: https://4x-ant-design.antgroup.com
* Ant Design 3.x: https://ant-design-3x.gitee.io
* Ant Design 2.x: https://ant-design-2x.gitee.io
* Ant Design 1.x: https://ant-design-1x.gitee.io
* Ant Design Pro: https://ant-design-pro.gitee.io
* Ant Design Mobile: https://antd-mobile.gitee.io
* Ant Motion: https://ant-motion.gitee.io
* Ant Design 3.x: http://ant-design-3x.gitee.io
* Ant Design 2.x: http://ant-design-2x.gitee.io
* Ant Design 1.x: http://ant-design-1x.gitee.io
* Ant Design Pro: http://ant-design-pro.gitee.io
* Ant Design Mobile: http://antd-mobile.gitee.io
* Ant Motion: http://ant-motion.gitee.io
* Ant Design Pro Preview : https://prosite.z23.web.core.windows.net
- name: check ie
if: contains(github.event.issue.body, 'ant-design-issue-helper') == true && contains(github.event.issue.title, 'IE9') == true || contains(github.event.issue.title, 'IE 9') == true || contains(github.event.issue.title, 'IE10') == true || contains(github.event.issue.title, 'IE 10') == true || contains(github.event.issue.title, 'IE11') == true || contains(github.event.issue.title, 'IE 11') == true || contains(github.event.issue.title, 'Internet Explorer') == true || contains(github.event.issue.body, 'IE9') == true || contains(github.event.issue.body, 'IE 9') == true || contains(github.event.issue.body, 'IE10') == true || contains(github.event.issue.body, 'IE 10') == true || contains(github.event.issue.body, 'IE11') == true || contains(github.event.issue.body, 'IE 11') == true || contains(github.event.issue.body, 'Internet Explorer') == true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
run: npm run site
env:
SITE_ENV: development
NODE_OPTIONS: --max_old_space_size=4096

- name: upload site artifact
uses: actions/upload-artifact@v3
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/release-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
with:
triger: 'tag'
changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md'
branch: 'master, 4.x-stable'
tag: '5*, 4*'
branch: 'master'
dingding-token: ${{ secrets.DINGDING_BOT_TOKEN }}
dingding-msg: 'CHANGELOG.zh-CN.md'
msg-title: '# Ant Design {{v}} 发布日志'
Expand All @@ -35,18 +34,27 @@ jobs:
prettier: true
prerelease-filter: '-, a, b, A, B'

- name: notice next
uses: actions-cool/release-helper@v2
with:
triger: 'tag'
dingding-token: ${{ secrets.DINGDING_BOT_V5_PRE_TOKEN }}
msg-title: '# Ant Design {{v}} 发布日志'
msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ'
msg-footer: '💬 前往 [**Ant Design Releases**]({{url}}) 查看更新日志'
prerelease-filter: '-, a, b, A, B'
prerelease-notice: true

- name: notice bigfish
uses: actions-cool/release-helper@v2
with:
triger: 'tag'
changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md'
branch: 'master, 4.x-stable'
tag: '5*, 4*'
branch: 'master'
dingding-token: ${{ secrets.DINGDING_BOT_BIGFISH_TOKEN }} ${{ secrets.DINGDING_BOT_YUNFENGDIE_TOKEN }}
dingding-msg: 'CHANGELOG.zh-CN.md'
dingding-delay-minute: 10
release: false
conch-tag: 'conch-v5, conch'
antd-conch-msg: '🐟 当前 Bigfish 内嵌 antd 版本:'
msg-title: '# Ant Design {{v}} 发布日志'
msg-poster: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ'
Expand Down
119 changes: 118 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ jobs:
run: npm run lint
needs: setup

tsx-demo:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: restore cache from package-lock.json
uses: actions/cache@v3
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: tsx-demo
run: npm run check-ts-demo
needs: setup

check_metadata:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -121,6 +143,92 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
needs: setup

############################### Style ################################
style-compile:
name: es style compile
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: restore cache from package-lock.json
uses: actions/cache@v3
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: restore cache from lib
uses: actions/cache@v3
with:
path: lib
key: lib-${{ github.sha }}

- name: restore cache from es
uses: actions/cache@v3
with:
path: es
key: es-${{ github.sha }}

- name: lessc component
run: npx lessc --js ./es/button/style/index.less

- name: lessc mixins
run: npx lessc --js ./es/style/mixins/index.less
needs: compile

style-dist:
name: dist style compile
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: restore cache from package-lock.json
uses: actions/cache@v3
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: restore cache from lib
uses: actions/cache@v3
with:
path: lib
key: lib-${{ github.sha }}

- name: restore cache from es
uses: actions/cache@v3
with:
path: es
key: es-${{ github.sha }}

- name: restore cache from dist
uses: actions/cache@v3
with:
path: dist
key: dist-${{ github.sha }}

- name: lessc default
run: npx lessc --js ./dist/antd.less

- name: lessc dark
run: npx lessc --js ./dist/antd.dark.less

- name: lessc variable
run: npx lessc --js ./dist/antd.variable.less
needs: [compile, dist]

################################ Test ################################
normal-test:
name: test
Expand Down Expand Up @@ -250,6 +358,12 @@ jobs:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: cache lib
uses: actions/cache@v3
with:
path: lib
key: lib-${{ github.sha }}

- name: cache es
uses: actions/cache@v3
with:
Expand All @@ -258,6 +372,9 @@ jobs:

- name: compile
run: npm run compile

- name: check
run: node ./tests/dekko/lib.test.js
needs: setup

compiled-module-test:
Expand All @@ -266,7 +383,7 @@ jobs:
strategy:
matrix:
react: ['16', '17', '18']
module: [es]
module: [lib, es]
shard: ['1/2', '2/2']
env:
REACT: ${{ matrix.react }}
Expand Down

0 comments on commit 5a2e562

Please sign in to comment.