Skip to content

Commit

Permalink
chore: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Nov 13, 2022
2 parents 38d75cf + 2f38076 commit ac85fbe
Show file tree
Hide file tree
Showing 55 changed files with 787 additions and 249 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2.1
jobs:
test-argos-ci:
docker:
- image: cimg/node:16.18.0-browsers
- image: cimg/node:16.18.1-browsers
steps:
- checkout
- run:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/codeball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Codeball
on:
pull_request: {}
pull_request_review_comment:
types: [created, edited]

jobs:
codeball_job:
runs-on: ubuntu-latest
name: Codeball
steps:
# Run Codeball on all new Pull Requests and Review Comments! 🚀
# For customizations and more documentation, see https://github.com/sturdy-dev/codeball-action
- name: Codeball
uses: sturdy-dev/codeball-action@v2
with:
# Settings for "Codeball Approver"
approvePullRequests: "false"
labelPullRequestsWhenApproved: "true"
labelPullRequestsWhenReviewNeeded: "true"
failJobsWhenReviewNeeded: "false"
13 changes: 12 additions & 1 deletion .github/workflows/release-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@ jobs:
prettier: true
prerelease-filter: '-, a, b, A, B'

- name: release bigfish
- 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'
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install pretty-quick --staged
npx --no-install lint-staged
6 changes: 3 additions & 3 deletions .jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const compileModules = [
const ignoreList = [];

// cnpm use `_` as prefix
['', '_'].forEach(prefix => {
compileModules.forEach(module => {
['', '_'].forEach((prefix) => {
compileModules.forEach((module) => {
ignoreList.push(`${prefix}${module}`);
});
});
Expand Down Expand Up @@ -71,5 +71,5 @@ module.exports = {
testEnvironmentOptions: {
url: 'http://localhost',
},
bail: true,
// bail: true,
};
2 changes: 1 addition & 1 deletion .jest.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ module.exports = {
testRegex: 'node\\.test\\.(j|t)sx$',
testEnvironment: 'node',
transformIgnorePatterns,
bail: true,
// bail: true,
};
23 changes: 23 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,29 @@ timeline: true

---

## 4.24.2

`2022-11-12`

- Image
- 💄 Image preview controls enter animation should not be zooming out. [#36456](https://github.com/ant-design/ant-design/pull/36456)
- 🐞 Fix Image preview not showing error images. [#38112](https://github.com/ant-design/ant-design/pull/38112)
- Typography
- 🐞 Fix Typography.Text `tooltip` do not display in List. [#38431](https://github.com/ant-design/ant-design/pull/38431) [@crazyair](https://github.com/crazyair)
- 🐞 Fix Typography.Paragraph flash issue in some situations. [#38439](https://github.com/ant-design/ant-design/pull/38439) [@tinyfind](https://github.com/tinyfind)
- 🐞 Fix Menu SubMenu flick when collapse it. [#36636](https://github.com/ant-design/ant-design/issues/36636) [@JarvisArt](https://github.com/JarvisArt)
- 🐞 Fix RangePicker that `onBlur` gets triggered when selecting dates. [#38411](https://github.com/ant-design/ant-design/pull/38411) [@kiner-tang](https://github.com/kiner-tang)
- 🐞 Result should hide icon when it is falsy. [#38488](https://github.com/ant-design/ant-design/pull/38488)
- 🐞 Fix Dropdown.Button throws `overlay is deprecated` warning. [#38446](https://github.com/ant-design/ant-design/pull/38446) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛎 Improve error message about multiple Form.Item children. [#38038](https://github.com/ant-design/ant-design/pull/38038) [@cincodenada](https://github.com/cincodenada)
- 🛠 Resolve Tree circular import issue. [#38421](https://github.com/ant-design/ant-design/pull/38421) [@KotoriK](https://github.com/KotoriK)
- 🐞 Fix Affix shake issue when switching visible. [#38410](https://github.com/ant-design/ant-design/pull/38410) [@imoctopus](https://github.com/imoctopus)
- 🐞 Fix Pagination `simple` mode should support `showTotal` property. [#38399](https://github.com/ant-design/ant-design/pull/38399)
- 🐞 Fix Modal.confirm buttons should not be interactive when modal is hiding. [#38400](https://github.com/ant-design/ant-design/pull/38400)
- 🐞 Fix Radio.Group style problem using in Drawer `extra`. [#38385](https://github.com/ant-design/ant-design/pull/38385)
- ⌨️ Fix Table `aria-label` contains `[object Object]`. [#38389](https://github.com/ant-design/ant-design/pull/38389) [@kiner-tang](https://github.com/kiner-tang)
- ⌨️ Adds role progressbar to Progress component. [#38447](https://github.com/ant-design/ant-design/pull/38447) [@kpustakhod](https://github.com/kpustakhod)

## 4.24.1

`2022-11-04`
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,29 @@ timeline: true

---

## 4.24.2

`2022-11-12`

- Image
- 💄 优化 Image 预览图片的工具栏显示动画的效果,现在工具条不再用缩放动画进场。[#36456](https://github.com/ant-design/ant-design/pull/36456)
- 🐞 修复 Image 预览图片没有展现错误图片的问题。[#38112](https://github.com/ant-design/ant-design/pull/38112)
- Typography
- 🐞 修复 Typography.Paragraph 在宽度较短时可能出现闪动的问题。[#38439](https://github.com/ant-design/ant-design/pull/38439) [@tinyfind](https://github.com/tinyfind)
- 🐞 修复一个 Typography.Text 在 List 内 tooltip 不显示的问题。[#38431](https://github.com/ant-design/ant-design/pull/38431) [@crazyair](https://github.com/crazyair)
- 🐞 修复 Menu 收起时 SubMenu 闪动的问题。[#36636](https://github.com/ant-design/ant-design/issues/36636) [@JarvisArt](https://github.com/JarvisArt)
- 🐞 修复 RangePicker 选择日期过程中触发 `onBlur` 的问题。[#38411](https://github.com/ant-design/ant-design/pull/38411) [@kiner-tang](https://github.com/kiner-tang)
- 🐞 修复 Result `icon` 为 `null` 时图标没有隐藏的问题。[#38488](https://github.com/ant-design/ant-design/pull/38488)
- 🐞 修复 Dropdown.Button 出现 `overlay is deprecated` 警告的问题。[#38446](https://github.com/ant-design/ant-design/pull/38446) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛎 优化 Form 的相关控制台提示的表述。[#38038](https://github.com/ant-design/ant-design/pull/38038) [@cincodenada](https://github.com/cincodenada)
- 🛠 修复 Tree 模块循环导入的问题。[#38421](https://github.com/ant-design/ant-design/pull/38421) [@KotoriK](https://github.com/KotoriK)
- 🐞 修复当 Affix 隐藏切换到显示时会出现抖动。[#38410](https://github.com/ant-design/ant-design/pull/38410) [@imoctopus](https://github.com/imoctopus)
- 🐞 修复 Pagination `showTotal` 属性在 `simple` 模式下不生效的问题。[#38399](https://github.com/ant-design/ant-design/pull/38399)
- 🐞 修复 Modal.confirm 关闭中确认按钮依旧可能被触发的问题。[#38400](https://github.com/ant-design/ant-design/pull/38400)
- 🐞 修复在 Drawer `extra` 中使用 Radio.Group 的样式问题。[#38385](https://github.com/ant-design/ant-design/pull/38385)
- ⌨️ 修复 Table 组件 `aria-label` 出现 `[object Object]` 的问题。[#38389](https://github.com/ant-design/ant-design/pull/38389) [@kiner-tang](https://github.com/kiner-tang)
- ⌨️ Progress 组件增加 `role="progressbar"` 。[#38447](https://github.com/ant-design/ant-design/pull/38447) [@kpustakhod](https://github.com/kpustakhod)

## 4.24.1

`2022-11-04`
Expand Down
4 changes: 2 additions & 2 deletions components/_util/__tests__/util.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('Test utils function', () => {
});
});

it('delayRaf', done => {
it('delayRaf', (done) => {
jest.useRealTimers();

let bamboo = false;
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('Test utils function', () => {

describe('TransButton', () => {
it('can be focus/blur', () => {
const ref = React.createRef<any>();
const ref = React.createRef<HTMLDivElement>();
render(<TransButton ref={ref}>TransButton</TransButton>);
expect(typeof ref.current?.focus).toBe('function');
expect(typeof ref.current?.blur).toBe('function');
Expand Down
6 changes: 3 additions & 3 deletions components/_util/__tests__/wave.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ describe('Wave component', () => {
});

it('bindAnimationEvent should return when node is null', () => {
const ref = React.createRef<any>();
const ref = React.createRef<Wave>();
render(
<Wave ref={ref}>
<button type="button" disabled>
Expand All @@ -206,7 +206,7 @@ describe('Wave component', () => {
});

it('bindAnimationEvent.onClick should return when children is hidden', () => {
const ref = React.createRef<any>();
const ref = React.createRef<Wave>();
render(
<Wave ref={ref}>
<button type="button" style={{ display: 'none' }}>
Expand All @@ -218,7 +218,7 @@ describe('Wave component', () => {
});

it('bindAnimationEvent.onClick should return when children is input', () => {
const ref = React.createRef<any>();
const ref = React.createRef<Wave>();
render(
<Wave ref={ref}>
<input />
Expand Down
5 changes: 2 additions & 3 deletions components/_util/getRenderPropValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ export const getRenderPropValue = (
return null;
}

const isRenderFunction = typeof propValue === 'function';
if (isRenderFunction) {
return (propValue as RenderFunction)();
if (typeof propValue === 'function') {
return propValue();
}

return propValue;
Expand Down
4 changes: 2 additions & 2 deletions components/_util/hooks/useSyncState.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import useForceUpdate from './useForceUpdate';

type UseSyncStateProps<T> = [() => T, (newValue: T) => void];
type UseSyncStateProps<T> = readonly [() => T, (newValue: T) => void];

export default function useSyncState<T>(initialValue: T): UseSyncStateProps<T> {
const ref = React.useRef<T>(initialValue);
Expand All @@ -14,5 +14,5 @@ export default function useSyncState<T>(initialValue: T): UseSyncStateProps<T> {
// re-render
forceUpdate();
},
];
] as const;
}
12 changes: 5 additions & 7 deletions components/_util/wave/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getValidateContainer(nodeRoot: Node): Element {
}

return Array.from(nodeRoot.childNodes).find(
ele => ele?.nodeType === Node.ELEMENT_NODE,
(ele) => ele?.nodeType === Node.ELEMENT_NODE,
) as Element;
}

Expand Down Expand Up @@ -135,9 +135,7 @@ class InternalWave extends React.Component<WaveProps> {

styleForPseudo = updateCSS(
`
[${getPrefixCls('')}-click-animating-without-extra-node='true']::after, .${getPrefixCls(
'',
)}-click-animating-node {
[${getPrefixCls('')}-click-animating-without-extra-node='true']::after, .${getPrefixCls('')}-click-animating-node {
--antd-wave-shadow-color: ${waveColor};
}`,
'antd-wave',
Expand All @@ -147,7 +145,7 @@ class InternalWave extends React.Component<WaveProps> {
if (insertExtraNode) {
node.appendChild(extraNode);
}
['transition', 'animation'].forEach(name => {
['transition', 'animation'].forEach((name) => {
node.addEventListener(`${name}start`, this.onTransitionStart);
node.addEventListener(`${name}end`, this.onTransitionEnd);
});
Expand Down Expand Up @@ -180,7 +178,7 @@ class InternalWave extends React.Component<WaveProps> {
: `${getPrefixCls('')}-click-animating-without-extra-node`;
}

bindAnimationEvent = (node: HTMLElement) => {
bindAnimationEvent = (node?: HTMLElement) => {
if (
!node ||
!node.getAttribute ||
Expand Down Expand Up @@ -230,7 +228,7 @@ class InternalWave extends React.Component<WaveProps> {
if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
node.removeChild(this.extraNode);
}
['transition', 'animation'].forEach(name => {
['transition', 'animation'].forEach((name) => {
node.removeEventListener(`${name}start`, this.onTransitionStart);
node.removeEventListener(`${name}end`, this.onTransitionEnd);
});
Expand Down
Loading

0 comments on commit ac85fbe

Please sign in to comment.