diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 32029757a5ac..c1e8e1305f2d 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,4 @@ { - "sandboxes": ["antd-reproduction-template-6e93z"], + "sandboxes": ["antd-reproduction-template-y9vgcf"], "node": "14" } diff --git a/.eslintrc.js b/.eslintrc.js index 5282c51d9692..51944fce82e7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -159,6 +159,7 @@ module.exports = { 'jest/no-done-callback': 0, 'jest/valid-title': 0, 'jest/no-conditional-expect': 0, + 'jest/no-standalone-expect': 0, 'unicorn/better-regex': 2, 'unicorn/prefer-string-trim-start-end': 2, diff --git a/.github/workflows/disscustion-open-check.yml b/.github/workflows/disscustion-open-check.yml new file mode 100644 index 000000000000..1908b1acdc05 --- /dev/null +++ b/.github/workflows/disscustion-open-check.yml @@ -0,0 +1,23 @@ +name: Discussions + +on: + discussion: + types: [created] + +permissions: + contents: read + +jobs: + discussion-create: + permissions: + contents: read # for visiky/dingtalk-release-notify to get latest release + runs-on: ubuntu-latest + steps: + - name: send to dingtalk + uses: visiky/dingtalk-release-notify@main + with: + DING_TALK_TOKEN: ${{ secrets.DINGDING_BOT_TOKEN }} + notify_title: '🔥 @${{ github.event.discussion.user.login }} 创建了讨论:${{ github.event.discussion.title }}' + notify_body: '### 🔥 @${{ github.event.discussion.user.login }} 创建了讨论:[${{ github.event.discussion.title }}](${{ github.event.discussion.html_url }})
![](https://gw.alipayobjects.com/zos/antfincdn/5Cl2G7JjF/jieping2022-03-20%252520xiawu11.06.04.png)' + notify_footer: '> 💬 欢迎前往 GitHub 进行讨论,社区可能需要你的帮助。' + at_all: false # whether to ding everybody diff --git a/.github/workflows/release-helper.yml b/.github/workflows/release-helper.yml index 401f67d71ebe..5303b693e99b 100644 --- a/.github/workflows/release-helper.yml +++ b/.github/workflows/release-helper.yml @@ -40,7 +40,7 @@ jobs: triger: 'tag' changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md' branch: 'master' - dingding-token: ${{ secrets.DINGDING_BOT_BIGFISH_TOKEN }} + dingding-token: ${{ secrets.DINGDING_BOT_BIGFISH_TOKEN }} ${{ secrets.DINGDING_BOT_YUNFENGDIE_TOKEN }} dingding-msg: 'CHANGELOG.zh-CN.md' dingding-delay-minute: 10 release: false diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 3f3edea91f67..da30cf71234b 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -9,6 +9,7 @@ timeline: true | infrad version | antd version | update content | time | | --- | --- | --- | --- | +| 4.22.6 | 4.22.6 | Synchronize the update of antd 4.22.6 version | 2022-08-18 | | 4.22.3 | 4.22.3 | 1.Synchronize the update of antd 4.22.3 version
2.Modified the title's font size and font weight of the PageHeader component | 2022-08-04 | | 4.21.7 | 4.21.7 | Synchronize the update of antd 4.21.7 version | 2022-07-25 | | 4.21.6 | 4.21.6 | Synchronize the update of antd 4.21.6 version | 2022-07-15 | @@ -39,6 +40,38 @@ if you have some problem, welcome to connect `taofeng.yang@shopee.com` or `lay.z --- +## 4.22.6 + +`2022-08-17` + +- 🐞 Revert [#36710](https://github.com/ant-design/ant-design/pull/36710) to fix Table `onChange` argument `sorter` error in multiple columns sort. +- 🐞 Fix Drawer can not close when config `opacity` on the `maskStyle`. [#37100](https://github.com/ant-design/ant-design/pull/37100) + +## 4.22.5 + +`2022-08-15` + +- 🇭🇺 Form add defaultValidateMessages.i18n az_AZ language #23369. [#36967](https://github.com/ant-design/ant-design/pull/36967) [@YMiemie-cy](https://github.com/YMiemie-cy) +- 💄 Popover remove Popover incorrect box-shadow. [#37030](https://github.com/ant-design/ant-design/pull/37030) [@jerrykingxyz](https://github.com/jerrykingxyz) +- 🐞 Fix Steps tail position bug when `labelPlacement="vertical"`. [#36996](https://github.com/ant-design/ant-design/pull/36996) +- 💄 Removed exception error border for `Pagination`. [#36972](https://github.com/ant-design/ant-design/pull/36972) [@hydraZty](https://github.com/hydraZty) +- 🐞 Fix Upload trigger mistake files status when upload multiple files at same time in React 18. [#36968](https://github.com/ant-design/ant-design/pull/36968) +- TypeScript + - 🤖 Fix type error of useWatch. [#37013](https://github.com/ant-design/ant-design/pull/37013) [@LiZhiHao97](https://github.com/LiZhiHao97) + +## 4.22.4 + +`2022-08-08` + +- 🐞 Fix Drawer `zIndex` prop not working. [#36958](https://github.com/ant-design/ant-design/pull/36958) +- 💄 Fix PageHeader focus style stay after clicking it. [#36902](https://github.com/ant-design/ant-design/pull/36902) +- 💄 Fix Drawer nesting content-wrapper style. [#36845](https://github.com/ant-design/ant-design/pull/36845) [@yanm1ng](https://github.com/yanm1ng) +- 🐞 Fix Mentions popup shift when contain scrollbar. [#36898](https://github.com/ant-design/ant-design/pull/36898) [@JarvisArt](https://github.com/JarvisArt) +- TypeScript + - 🤖 Fix Avatar `onClick` type missing. [#36940](https://github.com/ant-design/ant-design/pull/36940) [@kungege](https://github.com/kungege) + - 🤖 Fix Table `onChange` argument `sorter` type error. [#36710](https://github.com/ant-design/ant-design/pull/36710) [@kungege](https://github.com/kungege) + - 🤖 Input `data-*` should not be required. [#36858](https://github.com/ant-design/ant-design/pull/36858) [@yifanwww](https://github.com/yifanwww) + ## 4.22.3 `2022-08-01` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 2a50037f966e..2f66f1f0c99a 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -9,6 +9,7 @@ timeline: true | infrad 版本号 | 对应 antd 版本号 | 更新内容 | 时间 | | --- | --- | --- | --- | +| 4.22.6 | 4.22.6 | 同步 antd 4.22.6 版本的更新 | 2022-08-18 | | 4.22.3 | 4.22.3 | 1.同步 antd 4.22.3 版本的更新
2.修改了 PageHeader 组件的 title 字重与字体大小 | 2022-08-04 | | 4.21.7 | 4.21.7 | 同步 antd 4.21.7 版本的更新 | 2022-07-25 | | 4.21.6 | 4.21.6 | 同步 antd 4.21.6 版本的更新 | 2022-07-15 | @@ -40,6 +41,38 @@ timeline: true --- +## 4.22.6 + +`2022-08-17` + +- 🐞 回滚 [#36710](https://github.com/ant-design/ant-design/pull/36710) 以修复 Table 多列排序时 `onChange` 中 `sorter` 参数错误的问题。 +- 🐞 修复 Drawer 的 `maskStyle` 配置 `opacity` 样式时无法关闭的问题。[#37100](https://github.com/ant-design/ant-design/pull/37100) + +## 4.22.5 + +`2022-08-15` + +- 🇭🇺 Form `defaultValidateMessages.i18n` 增加匈牙利语。[#36967](https://github.com/ant-design/ant-design/pull/36967) [@YMiemie-cy](https://github.com/YMiemie-cy) +- 💄 移除 Popover 中无效的 `box-shadow` 样式。[#37030](https://github.com/ant-design/ant-design/pull/37030) [@jerrykingxyz](https://github.com/jerrykingxyz) +- 🐞 修复 Steps `labelPlacement="vertical"` 时连接线位置偏上的问题。[#36996](https://github.com/ant-design/ant-design/pull/36996) +- 💄 去掉 Pagination 的异常错误边框。[#36972](https://github.com/ant-design/ant-design/pull/36972) [@hydraZty](https://github.com/hydraZty) +- 🐞 修复 Upload 在 React 18 下同时上传多份文件会出现上传状态不正确的问题。[#36968](https://github.com/ant-design/ant-design/pull/36968) +- TypeScript + - 🤖 修复 useWatch 的类型错误。[#37013](https://github.com/ant-design/ant-design/pull/37013) [@LiZhiHao97](https://github.com/LiZhiHao97) + +## 4.22.4 + +`2022-08-08` + +- 🐞 修复 Drawer `zIndex` 属性失效的问题。[#36958](https://github.com/ant-design/ant-design/pull/36958) +- 💄 修复 PageHeader 返回按钮点击后依然有聚焦样式的问题。[#36902](https://github.com/ant-design/ant-design/pull/36902) +- 💄 修复抽屉 Drawer 组件嵌套时,子抽屉的样式被父抽屉影响的问题。[#36845](https://github.com/ant-design/ant-design/pull/36845) [@yanm1ng](https://github.com/yanm1ng) +- 🐞 修复 Mentions 内有滚动条时弹出层偏移的问题。[#36898](https://github.com/ant-design/ant-design/pull/36898) [@JarvisArt](https://github.com/JarvisArt) +- TypeScript + - 🤖 修复 Avatar `onClick` 属性定义丢失的问题。[#36940](https://github.com/ant-design/ant-design/pull/36940) [@kungege](https://github.com/kungege) + - 🤖 修复 Table `onChange` 参数 `sorter` 类型报错的问题。[#36710](https://github.com/ant-design/ant-design/pull/36710) [@kungege](https://github.com/kungege) + - 🤖 Input `data-*` 属性将不再是必传参数。[#36858](https://github.com/ant-design/ant-design/pull/36858) [@yifanwww](https://github.com/yifanwww) + ## 4.22.3 `2022-08-01` diff --git a/components/alert/__tests__/index.test.tsx b/components/alert/__tests__/index.test.tsx index 8bebb5ecb08f..c6e54ebc63e9 100644 --- a/components/alert/__tests__/index.test.tsx +++ b/components/alert/__tests__/index.test.tsx @@ -1,9 +1,8 @@ import React from 'react'; -import { act } from 'react-dom/test-utils'; import Alert from '..'; import accessibilityTest from '../../../tests/shared/accessibilityTest'; import rtlTest from '../../../tests/shared/rtlTest'; -import { fireEvent, render, sleep } from '../../../tests/utils'; +import { fireEvent, render, sleep, act } from '../../../tests/utils'; import Button from '../../button'; import Popconfirm from '../../popconfirm'; import Tooltip from '../../tooltip'; @@ -33,13 +32,13 @@ describe('Alert', () => { />, ); + jest.useFakeTimers(); + fireEvent.click(container.querySelector('.ant-alert-close-icon')!); act(() => { - jest.useFakeTimers(); - fireEvent.click(container.querySelector('.ant-alert-close-icon')!); jest.runAllTimers(); - jest.useRealTimers(); }); expect(onClose).toHaveBeenCalled(); + jest.useRealTimers(); }); describe('action of Alert', () => { diff --git a/components/auto-complete/__tests__/__snapshots__/index.test.js.snap b/components/auto-complete/__tests__/__snapshots__/index.test.js.snap deleted file mode 100644 index d4791da9022c..000000000000 --- a/components/auto-complete/__tests__/__snapshots__/index.test.js.snap +++ /dev/null @@ -1,121 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AutoComplete legacy dataSource should accept react element option 1`] = ` - -`; - -exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` - -`; diff --git a/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap b/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap new file mode 100644 index 000000000000..3105d498290b --- /dev/null +++ b/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` + +`; diff --git a/components/auto-complete/__tests__/index.test.js b/components/auto-complete/__tests__/index.test.tsx similarity index 53% rename from components/auto-complete/__tests__/index.test.js rename to components/auto-complete/__tests__/index.test.tsx index 7686e70722ab..2c48bb833904 100644 --- a/components/auto-complete/__tests__/index.test.js +++ b/components/auto-complete/__tests__/index.test.tsx @@ -1,30 +1,35 @@ import React from 'react'; +import userEvent from '@testing-library/user-event'; import AutoComplete from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; -import { fireEvent, render } from '../../../tests/utils'; +import { render, screen } from '../../../tests/utils'; import Input from '../../input'; describe('AutoComplete', () => { mountTest(AutoComplete); rtlTest(AutoComplete); - it('AutoComplete with custom Input render perfectly', () => { - const { container } = render( + it('AutoComplete with custom Input render perfectly', async () => { + render(