From 919667a6d33a6c5b04226be23b698272afed2ae7 Mon Sep 17 00:00:00 2001 From: zombiej Date: Mon, 23 May 2022 16:04:32 +0800 Subject: [PATCH 1/8] chore: short auto merge time --- .github/workflows/pr-check-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check-ci.yml b/.github/workflows/pr-check-ci.yml index d842bd97e7..054c1e0522 100644 --- a/.github/workflows/pr-check-ci.yml +++ b/.github/workflows/pr-check-ci.yml @@ -3,7 +3,7 @@ name: PR Check CI on: schedule: - - cron: "*/10 * * * *" + - cron: "*/5 * * * *" permissions: contents: read From f3a893b11359ca603d940c927ab7dd07819d3d3a Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Mon, 23 May 2022 18:42:05 +0800 Subject: [PATCH 2/8] chore: update issue check mirror (#35680) --- .github/workflows/issue-open-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml index c99f2b12be..8c9de23edd 100644 --- a/.github/workflows/issue-open-check.yml +++ b/.github/workflows/issue-open-check.yml @@ -59,7 +59,8 @@ jobs: * Ant Motion: https://motion.ant.design ## 国内镜像 - * Ant Design: http://ant-design.gitee.io + * 官方镜像: https://ant-design.antgroup.com/ + * Gitee 镜像: http://ant-design.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 From 95f56f6d2080b20d442c331c1b4f5bdccd519ec9 Mon Sep 17 00:00:00 2001 From: vagusX Date: Tue, 24 May 2022 14:50:43 +0800 Subject: [PATCH 3/8] fix: division in less for Segmented (#35701) * fix: division in less for Segmented * fix: update --- components/segmented/style/index.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/segmented/style/index.less b/components/segmented/style/index.less index fd44ee1189..e9fb3bbf66 100644 --- a/components/segmented/style/index.less +++ b/components/segmented/style/index.less @@ -67,7 +67,7 @@ // syntactic sugar to add `icon` for Segmented Item &-icon + * { - margin-left: @margin-sm / 2; + margin-left: (@margin-sm / 2); } &-input { From 00eb63a3180164978d3e972d1f24e91f0ba6ad18 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Tue, 24 May 2022 18:43:28 +0800 Subject: [PATCH 4/8] chore: increase bundle size (#35709) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f550f07d11..77db677b43 100644 --- a/package.json +++ b/package.json @@ -305,7 +305,7 @@ "bundlesize": [ { "path": "./dist/antd.min.js", - "maxSize": "280 kB" + "maxSize": "282 kB" }, { "path": "./dist/antd.min.css", From 56bcd1ee9f605a19e22774f8739ced51e978dbb2 Mon Sep 17 00:00:00 2001 From: Niyaz Akhmetov Date: Tue, 24 May 2022 17:33:22 +0300 Subject: [PATCH 5/8] docs: fix mistype (#35714) --- components/collapse/index.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/collapse/index.en-US.md b/components/collapse/index.en-US.md index ae13c6124b..107a8a2f94 100644 --- a/components/collapse/index.en-US.md +++ b/components/collapse/index.en-US.md @@ -36,7 +36,7 @@ A content area which can be collapsed and expanded. | --- | --- | --- | --- | --- | | collapsible | Specify whether the panel be collapsible or the trigger area of collapsible | `header` \| `disabled` | - | 4.9.0 | | extra | The extra element in the corner | ReactNode | - | | -| forceRender | Forced render of content on panel, instead of lazy rending after clicking on header | boolean | false | | +| forceRender | Forced render of content on panel, instead of lazy rendering after clicking on header | boolean | false | | | header | Title of the panel | ReactNode | - | | | key | Unique key identifying the panel from among its siblings | string \| number | - | | | showArrow | If false, panel will not show arrow icon | boolean | true | | From 764069b202e0da383569bbbea493561d6a64a462 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Tue, 24 May 2022 22:53:17 +0800 Subject: [PATCH 6/8] docs: update demo code (#35695) * docs: update demo code * chore: increase bundle size * Revert "chore: increase bundle size" This reverts commit 1c75e5ab5a85259f4d610e33009072e3e9c9acd4. --- site/theme/template/Content/Demo/index.jsx | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/site/theme/template/Content/Demo/index.jsx b/site/theme/template/Content/Demo/index.jsx index 0d2e307655..a448356388 100644 --- a/site/theme/template/Content/Demo/index.jsx +++ b/site/theme/template/Content/Demo/index.jsx @@ -1,18 +1,18 @@ /* eslint jsx-a11y/no-noninteractive-element-interactions: 0 */ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { FormattedMessage, injectIntl } from 'react-intl'; -import CopyToClipboard from 'react-copy-to-clipboard'; +import { CheckOutlined, SnippetsOutlined, ThunderboltOutlined } from '@ant-design/icons'; +import stackblitzSdk from '@stackblitz/sdk'; +import { Alert, Badge, Tooltip } from 'antd'; import classNames from 'classnames'; import LZString from 'lz-string'; -import { Tooltip, Alert, Badge } from 'antd'; -import { SnippetsOutlined, CheckOutlined, ThunderboltOutlined } from '@ant-design/icons'; -import stackblitzSdk from '@stackblitz/sdk'; -import CodePreview from './CodePreview'; -import EditButton from '../EditButton'; +import React from 'react'; +import CopyToClipboard from 'react-copy-to-clipboard'; +import ReactDOM from 'react-dom'; +import { FormattedMessage, injectIntl } from 'react-intl'; import BrowserFrame from '../../BrowserFrame'; -import CodeSandboxIcon from './CodeSandboxIcon'; +import EditButton from '../EditButton'; import CodePenIcon from './CodePenIcon'; +import CodePreview from './CodePreview'; +import CodeSandboxIcon from './CodeSandboxIcon'; import RiddleIcon from './RiddleIcon'; const { ErrorBoundary } = Alert; @@ -275,7 +275,7 @@ class Demo extends React.Component { let parsedSourceCode = sourceCode; let importReactContent = "import React from 'react';"; - const importReactReg = /import(\D*)from 'react';/; + const importReactReg = /import React(\D*)from 'react';/; const matchImportReact = parsedSourceCode.match(importReactReg); if (matchImportReact) { [importReactContent] = matchImportReact; @@ -296,14 +296,14 @@ ${parsedSourceCode} const indexJsContent = react18 ? ` -${importReactContent} +import React from 'react'; import { createRoot } from 'react-dom/client'; import Demo from './demo'; createRoot(document.getElementById('container')).render(); ` : ` -${importReactContent} +import React from 'react'; import ReactDOM from 'react-dom'; import Demo from './demo'; From 5e5ad935a49549c8a80e218115bf93cac545a633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Wed, 25 May 2022 10:50:12 +0800 Subject: [PATCH 7/8] fix: drawer can not ref form instance when open (#35706) * fix: drawer can not ref form instance when open * fix: test * feat: div ref * feat: test * feat: test * feat: test * feat: test --- .../drawer/__tests__/DrawerEvent.test.js | 31 +++++++++++++++++++ components/drawer/index.tsx | 4 +-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/components/drawer/__tests__/DrawerEvent.test.js b/components/drawer/__tests__/DrawerEvent.test.js index e7973683a8..41cac02ca3 100644 --- a/components/drawer/__tests__/DrawerEvent.test.js +++ b/components/drawer/__tests__/DrawerEvent.test.js @@ -77,4 +77,35 @@ describe('Drawer', () => { fireEvent(document.querySelector('.ant-drawer-content-wrapper'), ev); expect(afterVisibleChange).toBeCalledTimes(1); }); + it('should support children ref', () => { + const fn = jest.fn(); + + const refCallback = ref => { + expect(typeof ref).toBe('object'); + fn(); + }; + + const RefDemo = () => { + const ref = React.useRef(); + const [visible, setVisible] = React.useState(false); + + React.useEffect(() => { + if (visible) { + refCallback(ref.current); + } + }, [visible]); + + return ( + <> + setVisible(true)}>open + +
+ + + ); + }; + const { container } = render(); + fireEvent.click(container.querySelector('a')); + expect(fn).toBeCalled(); + }); }); diff --git a/components/drawer/index.tsx b/components/drawer/index.tsx index 06ff8f4acf..e00bea58d6 100644 --- a/components/drawer/index.tsx +++ b/components/drawer/index.tsx @@ -266,7 +266,7 @@ const Drawer = React.forwardRef( // render drawer body dom const renderBody = () => { // destroyCloseRef.current =false Load the body only once by default - if (destroyCloseRef.current && !forceRender && !load) { + if (destroyCloseRef.current && !forceRender && !propsVisible) { return null; } @@ -306,7 +306,7 @@ const Drawer = React.forwardRef( ...rest, }} {...offsetStyle} - open={visible} + open={visible || propsVisible} showMask={mask} style={getRcDrawerStyle()} className={drawerClassName} From a48a0497eeabf3aa1f15c5a8b91bd16523e15af5 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Wed, 25 May 2022 11:45:19 +0800 Subject: [PATCH 8/8] chore: lock stylelint (#35725) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77db677b43..d014f75d3e 100644 --- a/package.json +++ b/package.json @@ -283,7 +283,7 @@ "scrollama": "^3.0.0", "semver": "^7.3.5", "simple-git": "^3.0.0", - "stylelint": "^14.0.0", + "stylelint": "14.8.3", "stylelint-config-prettier": "^9.0.2", "stylelint-config-rational-order": "^0.1.2", "stylelint-config-standard": "^25.0.0",