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

chore: Merge master into feature #19304

Merged
merged 52 commits into from Oct 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4e1bbcc
refactor: add @form-item-label-colon-margin-{right,left} (#15478)
willc001 Oct 14, 2019
453c01a
tuple for column fixed prop types
yoyo837 Oct 14, 2019
cfcdf2f
:memo: Add promote link in home page
afc163 Oct 14, 2019
7366afa
:up: upgrade pretty-quick
afc163 Oct 14, 2019
37e5ce4
:lipstick: fix promote link style in small screen
afc163 Oct 14, 2019
51f9b95
:memo: Add remax to Footer
afc163 Oct 14, 2019
c93f54c
:memo: fix typo link
afc163 Oct 14, 2019
6db3711
upgrade table demo : onChange add args extra
yoyo837 Oct 15, 2019
bae2752
ci: fix node version of github action (#19216)
orzyyyy Oct 15, 2019
0b1894e
:memo: deprecated info of autosize
afc163 Oct 15, 2019
a72f43b
Merge pull request #19206 from ant-design/feature
yesmeck Oct 15, 2019
59685af
Provide additional args for onChange sorter when unsorting
yoyo837 Oct 15, 2019
a2f28f0
:lipstick: add @typography-title-margin-top and @typography-title-mar…
mucluck Oct 15, 2019
8ffaeb8
Docs: upload with aliyun oss (#19054)
shaodahong Oct 15, 2019
0522d55
snapshot
yoyo837 Oct 15, 2019
5a07b85
upgrade `fires change event` test case
yoyo837 Oct 15, 2019
59f231f
:lipstick: fix menu style broken in dropdown
afc163 Oct 10, 2019
8e2b247
:white_check_mark: update snapshots
afc163 Oct 15, 2019
cd3d9ef
Merge branches 'add-args-unsorting' and 'master' of github.com:ant-de…
yoyo837 Oct 15, 2019
a9d7178
upgrade snapshot
yoyo837 Oct 15, 2019
fb2bafb
upgrade snapshot
yoyo837 Oct 15, 2019
ab34970
fix: fix cascader placeholder internationalization (#19227)
kagawagao Oct 15, 2019
dee4b25
docs: add 3.24.0 changelog
yesmeck Oct 15, 2019
3f38861
Merge pull request #19236 from ant-design/release-3.24.0
yesmeck Oct 16, 2019
99addfb
bump 3.24.0
yesmeck Oct 16, 2019
04f333b
Revert "docs: add 3.24.0 changelog"
yesmeck Oct 16, 2019
de9635e
docs: add 3.24.0 changelog
yesmeck Oct 16, 2019
71e0f9b
docs: update changelog
yesmeck Oct 16, 2019
5676ea2
docs: update changlog
yesmeck Oct 16, 2019
7d32f99
fix: Add missing typescript define (#19251)
zombieJ Oct 16, 2019
f2e541a
refactor: improve typescript module declare (#19254)
shaodahong Oct 17, 2019
d6c5e53
docs: fix page header API (#19257)
hsuanxyz Oct 17, 2019
0f83e0a
fix: should work in old version react (#19262)
zombieJ Oct 17, 2019
5bd3d4a
docs: Update 3.24.1 changelog (#19270)
zombieJ Oct 17, 2019
07ca5e4
Fix: long author name breaks on small screen (#19272)
rayronvictor Oct 17, 2019
a31deb7
fix: 修复点击下载按钮会执行预览方法 (#19268)
qq645381995 Oct 17, 2019
3eead25
Fix typos in en-US contributing guide (#19277)
broder Oct 17, 2019
3f037b6
Improve types for customRequest prop on Upload component
Oct 17, 2019
40aca57
chore: Remove React function polyfill (#19279)
zombieJ Oct 18, 2019
b280b63
chore: fix compile fail when use cnpm installed
shaodahong Oct 18, 2019
59ec7f3
corrected the typographical error of word 'case' to 'care' (#19290)
Niyiojeyinka Oct 18, 2019
53c55ce
Fix Select Mode Type
wleven Oct 18, 2019
9cfc151
Fix Select Mode Type
wleven Oct 18, 2019
63feb68
Fix Select Mode Type
wleven Oct 18, 2019
13d219c
:bug: Fix Table scroll.x max-content not working
afc163 Oct 18, 2019
8a715d0
:memo: :clapper: improve grid demo and documentaion
afc163 Oct 18, 2019
cd6ff75
test: official site checker before publish (#19247)
ycjcl868 Oct 18, 2019
e7ebf85
fix(#18280): add type [Moment.moment, undefined] to RangePickerValue…
neung123 Oct 19, 2019
b9b239e
test: add test case for ref test (#19302)
zombieJ Oct 19, 2019
ee6f2d3
:sparkles: release 3.24.2
afc163 Oct 18, 2019
a92c147
:memo: fix wrong changelog
afc163 Oct 19, 2019
c13b475
:memo: update changelog
afc163 Oct 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions .circleci/config.yml
Expand Up @@ -184,6 +184,7 @@ jobs:
command: npm test -- -w 1 -u
environment:
LIB_DIR: dist
REACT: 15

test_lib_15:
<<: *container_config
Expand All @@ -196,6 +197,7 @@ jobs:
command: npm test -- -w 1 -u
environment:
LIB_DIR: lib
REACT: 15

test_es_15:
<<: *container_config
Expand All @@ -208,6 +210,7 @@ jobs:
command: npm test -- -w 1 -u
environment:
LIB_DIR: es
REACT: 15

test_dom_15:
<<: *container_config
Expand All @@ -216,7 +219,10 @@ jobs:
- checkout
- *attach_workspace
- *install_react
- run: npm test -- -w 1 -u
- run:
command: npm test -- -w 1 -u
environment:
REACT: 15

test_node_15:
<<: *container_config
Expand All @@ -225,7 +231,10 @@ jobs:
- checkout
- *attach_workspace
- *install_react
- run: npm run test-node -- -w 1 -u
- run:
command: npm run test-node -- -w 1 -u
environment:
REACT: 15

check_metadata:
<<: *container_config
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/nodejs.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,18 @@
name: test

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@master

- name: install
run: npm install

- name: test
run: npm run test-all
22 changes: 22 additions & 0 deletions .jest.site.js
@@ -0,0 +1,22 @@
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');

// jest config for server render environment
module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
moduleNameMapper,
transform: {
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
},
testRegex: 'check-site\\.js$',
testEnvironment: 'node',
transformIgnorePatterns,
snapshotSerializers: ['enzyme-to-json/serializer'],
globals: {
'ts-jest': {
tsConfigFile: './tsconfig.test.json',
},
},
};
60 changes: 60 additions & 0 deletions CHANGELOG.en-US.md
Expand Up @@ -15,6 +15,66 @@ timeline: true

---

## 3.24.2

`2019-10-19`

- 🐞 Fix Table `scroll={{ x: 'max-content' }}` rendered without scrollbar problem in Chrome. [#19284](https://github.com/ant-design/ant-design/pull/19284)
- 🐞 Fix Table crash when passing `column.filterDropdown` as new prop. [#19302](https://github.com/ant-design/ant-design/pull/19302)
- 🐞 Fix Upload `download` button trigger preview unexpectedly. [#19268](https://github.com/ant-design/ant-design/pull/19268) [@qq645381995](https://github.com/qq645381995)
- 🐞 Fix Comment long author name breaks on small screen. [#19272](https://github.com/ant-design/ant-design/pull/19272) [@rayronvictor](https://github.com/rayronvictor)
- Typescript
- 🐞 Improve RangePicker `value` types. [#19300](https://github.com/ant-design/ant-design/pull/19300) [@neung123](https://github.com/neung123)
- 🐞 Improve Select `mode` types. [#19286](https://github.com/ant-design/ant-design/pull/19286) [@wleven](https://github.com/wleven)
- 🐞 Improve Upload `customRequest` types. [#19278](https://github.com/ant-design/ant-design/pull/19278) [@broder](https://github.com/broder)

## 3.24.1

`2019-10-17`

- 🐞 Fix Table throw `React.createRef is not a function error` in old version of React . [#19262](https://github.com/ant-design/ant-design/pull/19262)
- 🐞 Fix Table TypeScript definition missing Column and ColumnGroup. [#19251](https://github.com/ant-design/ant-design/pull/19251)

## 3.24.0

`2019-10-16`

- 🔥 Promote [Yuque](https://www.yuque.com/?chInfo=ch_antd) on home page.
- Table
- 🌟 Added `tableLayout` property for `table-layout` attribute. And using `tableLayout="fixed"` by default in scroll table to resolve align issue caused by cell content. [#17284](https://github.com/ant-design/ant-design/pull/17284)
- 🌟 Added `column.ellipsis` to ellipsize cell content.
- 🌟 Added the `scroll.scrollToFirstRowOnChange` property to set whether to scroll to the top of the table after page changing. [#18726](https://github.com/ant-design/ant-design/pull/18726)
- 🌟 `filterDropdown` added a `visible` parameter to get the display state of the dropdown box. [#17614](https://github.com/ant-design/ant-design/pull/17614) [@sedx](https://github.com/ant-design/ant-design/pull/17614)
- 🌟 `title` added a `sortColumn` parameter to get the currently sorted column. [#19012](https://github.com/ant-design/ant-design/pull/19012) [@swillis12](https://github.com/swillis12)
- 🌟 The `sorter` parameter of `onChange` will always contain `column` information when sorting. [#19226](https://github.com/ant-design/ant-design/pull/19226)
- 🐞 Fix Table filter submenu checkbox margin. [#e1a4f28](https://github.com/ant-design/ant-design/commit/e1a4f2891e3c35ae26495432bd2d288d4d81064a)
- 🌟 Anchor added a `onChange` attribute to listen for changes to anchor links. [#18715](https://github.com/ant-design/ant-design/pull/18715)
- Upload
- 🌟 Added `showDownloadIcon` attribute to display download icon. [#18664](https://github.com/ant-design/ant-design/pull/18664) [@qq645381995](https://github.com/qq645381995)
- 🌟 Support for `onRemove` control of upload interrupts. [#18937](https://github.com/ant-design/ant-design/pull/18937) [@ladjzero](https://github.com/ladjzero)
- 🌟 Input.Search added a `loading` property to show the state in the load. [#18771](https://github.com/ant-design/ant-design/pull/18771)
- 🌟 Grid's `gutter` property added support for vertical spacing. Now you can set an array for `gutter` and the second value of the array for vertical spacing. [#18979](https://github.com/ant-design/ant-design/pull/18979)
- 🌟 message added support for updating content with a unique key. [#18678](https://github.com/ant-design/ant-design/pull/18678)
- 🌟 Layout added a `zeroWidthTriggerStyle` property to control the style of the special `trigger` that appears when `collapsedWidth` is `0`. [#19079](https://github.com/ant-design/ant-design/pull/19079)
- 🌟 Drawer added the `drawerStyle` and `headerStyle` properties. [#19109](https://github.com/ant-design/ant-design/pull/19109)
- PageHeader
- 💄 Redesigned. [#19100](https://github.com/ant-design/ant-design/pull/19100)
- 🌟 Added `ghost` property to set whether white background is needed. [#19100](https://github.com/ant-design/ant-design/pull/19100)
- ConfigProvider
- 🌟 Added `pageHeader` to globally control the style of PageHeader. [#19100](https://github.com/ant-design/ant-design/pull/19100)
- 🐞 Fixed the issue that `moment` can't be tree-shark. [#19115](https://github.com/ant-design/ant-design/pull/19115)
- 🐞 Fixed the issue that the `removeIcon` and `clearIcon` properties of TreeSelect didn't work. [#18949](https://github.com/ant-design/ant-design/pull/18949)
- 🐞 Fixed the issue that the `switcherIcon` does not take effect after the Tree setting `showLine`. [#18829](https://github.com/ant-design/ant-design/pull/18829) [@MrHeer](https://github.com/MrHeer)
- 🐞 Fixed the issue that the Slider component set the handle size and positioned incorrectly. [#19120](https://github.com/ant-design/ant-design/pull/19120)
- Collapse
- 🐞 Fix icon styles under IE 11. [#19135](https://github.com/ant-design/ant-design/pull/19135) [@GBcrimson](https://github.com/GBcrimson)
- 🐞 Keep `className` given to `expandIcon`. [#19160](https://github.com/ant-design/ant-design/pull/19160) [@gpetrioli](https://github.com/gpetrioli)
- 🐞 Fixed the issue that `defaultExpandAll` does not take effect when Tree.DirectoryTree component passed `treeData`. [#19148](https://github.com/ant-design/ant-design/pull/19148)
- 🐞 Fixed the issue with some of the Menu styles under Dropdown. [#19150](https://github.com/ant-design/ant-design/pull/19150)
- 🐞 Fixed Cascader's `placeholder` internationalization error. [#19227](https://github.com/ant-design/ant-design/pull/19227) [@kagawagao](https://github.com/kagawagao)
- 🌟 Added less variables `@typography-title-margin-top`, `@typography-title-margin-bottom`. [#18746](https://github.com/ant-design/ant-design/pull/18746)
- 🗑 Discard the `autosize` property of Input.TextArea, use `autoSize` instead. [#19177](https://github.com/ant-design/ant-design/pull/19177)

## 3.23.6

`2019-10-05`
Expand Down
60 changes: 60 additions & 0 deletions CHANGELOG.zh-CN.md
Expand Up @@ -15,6 +15,66 @@ timeline: true

---

## 3.24.2

`2019-10-19`

- 🐞 修复 Table `scroll.x` 设置 `max-content` 无效导致横向滚动消失的问题。[#19284](https://github.com/ant-design/ant-design/pull/19284)
- 🐞 修复 Table 将 `column.filterDropdown` 作为新属性设置时报错的问题。[#19302](https://github.com/ant-design/ant-design/pull/19302)
- 🐞 Fix Upload 点击下载按钮会触发预览的问题。[#19268](https://github.com/ant-design/ant-design/pull/19268) [@qq645381995](https://github.com/qq645381995)
- 🐞 修复 Comment 长作者名在小屏幕上破坏布局的问题。[#19272](https://github.com/ant-design/ant-design/pull/19272) [@rayronvictor](https://github.com/rayronvictor)
- Typescript
- 🐞 优化 RangePicker `value` 属性定义。[#19300](https://github.com/ant-design/ant-design/pull/19300) [@neung123](https://github.com/neung123)
- 🐞 优化 Select `mode` 属性定义。[#19286](https://github.com/ant-design/ant-design/pull/19286) [@wleven](https://github.com/wleven)
- 🐞 优化 Upload `customRequest` 属性定义。[#19278](https://github.com/ant-design/ant-design/pull/19278) [@broder](https://github.com/broder)

## 3.24.1

`2019-10-17`

- 🐞 修复 Table 在旧版 React 会报 `React.createRef is not a function` 的错误信息。[#19262](https://github.com/ant-design/ant-design/pull/19262)
- 🐞 修复 Table TypeScript 定义丢失 Column 和 ColumnGroup 的问题。[#19251](https://github.com/ant-design/ant-design/pull/19251)

## 3.24.0

`2019-10-16`

- 🔥 首页新增[语雀](https://www.yuque.com/?chInfo=ch_antd)的推广链接。
- Table
- 🌟 新增 `tableLayout` 属性,支持设置表格的 `table-layout` 布局,并在固定表头/列下默认开启 `tableLayout="fixed"`,解决因为表格自动根据内容排版造成的列对齐问题。[#17284](https://github.com/ant-design/ant-design/pull/17284)
- 🌟 新增 `column.ellipsis` 支持单元格内容自动省略。
- 🌟 新增 `scroll.scrollToFirstRowOnChange` 属性,用于设置在翻页后是否滚动到表格顶部。[#18726](https://github.com/ant-design/ant-design/pull/18726)
- 🌟 `filterDropdown` 新增 `visible` 参数,用于获取下拉框的显示状态。[#17614](https://github.com/ant-design/ant-design/pull/17614) [@sedx](https://github.com/ant-design/ant-design/pull/17614)
- 🌟 `title` 方法新增 `sortColumn` 参数,用于获取当前排序的列。[#19012](https://github.com/ant-design/ant-design/pull/19012) [@swillis12](https://github.com/swillis12)
- 🌟 排序时 `onChange` 的 `sorter` 参数将始终包含 `column` 信息。[#19226](https://github.com/ant-design/ant-design/pull/19226)
- 🐞 修复过滤下拉菜单的间距问题。[#e1a4f28](https://github.com/ant-design/ant-design/commit/e1a4f2891e3c35ae26495432bd2d288d4d81064a)
- 🌟 Anchor 新增 `onChange` 属性,用于监听锚点链接的改变。[#18715](https://github.com/ant-design/ant-design/pull/18715)
- Upload
- 🌟 新增 `showDownloadIcon` 属性,用于展示下载图标。[#18664](https://github.com/ant-design/ant-design/pull/18664) [@qq645381995](https://github.com/qq645381995)
- 🌟 支持 `onRemove` 对上传中断的控制。[#18937](https://github.com/ant-design/ant-design/pull/18937) [@ladjzero](https://github.com/ladjzero)
- 🌟 Input.Search 新增 `loading` 属性,用于展示加载中的状态。[#18771](https://github.com/ant-design/ant-design/pull/18771)
- 🌟 Grid 的 `gutter` 属性新增垂直间距的支持,现在你可以给 `gutter` 设置一个数组,数组的第二个值就表示垂直间距。[#18979](https://github.com/ant-design/ant-design/pull/18979)
- 🌟 message 新增支持通过唯一的 `key` 来更新内容。[#18678](https://github.com/ant-design/ant-design/pull/18678)
- 🌟 Layout 新增 `zeroWidthTriggerStyle` 属性以控制当 `collapsedWidth` 为 `0` 时,出现的特殊 `trigger` 的样式。[#19079](https://github.com/ant-design/ant-design/pull/19079)
- 🌟 Drawer 新增 `drawerStyle` 和 `headerStyle` 属性。[#19109](https://github.com/ant-design/ant-design/pull/19109)
- PageHeader
- 💄 重新设计了样式 [#19100](https://github.com/ant-design/ant-design/pull/19100)
- 🌟 新增 `ghost` 属性,用于设置是否需要白底背景。[#19100](https://github.com/ant-design/ant-design/pull/19100)
- ConfigProvider
- 🌟 新增 `pageHeader` 用于全局控制 PageHeader 的样式。[#19100](https://github.com/ant-design/ant-design/pull/19100)
- 🐞 修复 moment 不能被 tree shaking 的问题。[#19115](https://github.com/ant-design/ant-design/pull/19115)
- 🐞 修复 TreeSelect 的 `removeIcon` 和 `clearIcon` 属性不生效的问题。[#18949](https://github.com/ant-design/ant-design/pull/18949)
- 🐞 修复 Tree 设置 `showLine` 后 `switcherIcon` 不生效的问题。[#18829](https://github.com/ant-design/ant-design/pull/18829) [@MrHeer](https://github.com/MrHeer)
- 🐞 修复 Slider 组件设置 `handle` 大小后定位错误的问题。[#19120](https://github.com/ant-design/ant-design/pull/19120)
- Collapse
- 🐞 修复在 IE 11 下的图标样式。[#19135](https://github.com/ant-design/ant-design/pull/19135) [@GBcrimson](https://github.com/GBcrimson)
- 🐞 修复 `expandIcon` 的 `className` 会被覆盖的问题。[#19160](https://github.com/ant-design/ant-design/pull/19160) [@gpetrioli](https://github.com/gpetrioli)
- 🐞 修复 Tree.DirectoryTree 组件传入 `treeData` 时 `defaultExpandAll` 不生效的问题。[#19148](https://github.com/ant-design/ant-design/pull/19148)
- 🐞 修复 Dropdown 下部分 Menu 样式错乱的问题。[#19150](https://github.com/ant-design/ant-design/pull/19150)
- 🐞 修复 Cascader 的 `placeholder` 国际化错误。[#19227](https://github.com/ant-design/ant-design/pull/19227) [@kagawagao](https://github.com/kagawagao)
- 🌟 新增 less 变量 `@typography-title-margin-top` 和 `@typography-title-margin-bottom`。[#18746](https://github.com/ant-design/ant-design/pull/18746)
- 🗑 废弃 Input.TextArea 的 `autosize` 属性,请使用 `autoSize` 代替。[#19177](https://github.com/ant-design/ant-design/pull/19177)

## 3.23.6

`2019-10-05`
Expand Down
Expand Up @@ -952,7 +952,6 @@ exports[`Cascader should highlight keyword and filter when search in Cascader 1`
},
]
}
placeholder="Please select"
popupClassName=""
popupPlacement="bottomLeft"
popupVisible={true}
Expand Down Expand Up @@ -1250,7 +1249,6 @@ exports[`Cascader should render not found content 1`] = `
},
]
}
placeholder="Please select"
popupClassName=""
popupPlacement="bottomLeft"
popupVisible={true}
Expand Down Expand Up @@ -1578,7 +1576,6 @@ exports[`Cascader should show not found content when options.length is 0 1`] = `
},
]
}
placeholder="Please select"
popupClassName=""
popupPlacement="bottomLeft"
popupVisible={true}
Expand Down
11 changes: 11 additions & 0 deletions components/cascader/__tests__/index.test.js
Expand Up @@ -491,4 +491,15 @@ describe('Cascader', () => {
);
expect(popupWrapper.render()).toMatchSnapshot();
});

it('placeholder works correctly', () => {
const wrapper = mount(<Cascader options={[]} />);
expect(wrapper.find('input').prop('placeholder')).toBe('Please select');

const customPlaceholder = 'Custom placeholder';
wrapper.setProps({
placeholder: customPlaceholder,
});
expect(wrapper.find('input').prop('placeholder')).toBe(customPlaceholder);
});
});
3 changes: 1 addition & 2 deletions components/cascader/index.tsx
Expand Up @@ -216,7 +216,6 @@ function warningValueNotExist(list: CascaderOptionType[], fieldNames: FieldNames

class Cascader extends React.Component<CascaderProps, CascaderState> {
static defaultProps = {
placeholder: 'Please select',
transitionName: 'slide-up',
popupPlacement: 'bottomLeft',
options: [],
Expand Down Expand Up @@ -430,7 +429,7 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
prefixCls: customizePrefixCls,
inputPrefixCls: customizeInputPrefixCls,
children,
placeholder = locale.placeholder,
placeholder = locale.placeholder || 'Please select',
size,
disabled,
className,
Expand Down
2 changes: 1 addition & 1 deletion components/comment/style/index.less
Expand Up @@ -32,12 +32,12 @@

&-author {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin-bottom: 4px;
font-size: @comment-font-size-base;
& > a,
& > span {
height: 18px;
padding-right: 8px;
font-size: @comment-font-size-sm;
line-height: 18px;
Expand Down