From a4f09575766215def5b4e0d6d1a5546e8b611069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 2 Feb 2021 22:05:31 +0800 Subject: [PATCH] docs: add 4.12.0 changelog (#29131) * docs: add 4.11.3 changelog * update docs * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * update docs * add 4.12.0 changelog * update docs * fix typo * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * Update CHANGELOG.en-US.md Co-authored-by: afc163 * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * Update CHANGELOG.en-US.md Co-authored-by: afc163 * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * Update CHANGELOG.en-US.md Co-authored-by: afc163 * Update CHANGELOG.en-US.md Co-authored-by: afc163 * fix changelog * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 * update docs * Update CHANGELOG.zh-CN.md Co-authored-by: xrkffgg * Update CHANGELOG.zh-CN.md Co-authored-by: einq7 <50612752+AlanCutFlim@users.noreply.github.com> * fix typo * fix typo * Update CHANGELOG.en-US.md Co-authored-by: afc163 Co-authored-by: afc163 Co-authored-by: xrkffgg Co-authored-by: einq7 <50612752+AlanCutFlim@users.noreply.github.com> --- CHANGELOG.en-US.md | 23 +++++++++++++++++++ CHANGELOG.zh-CN.md | 23 +++++++++++++++++++ components/form/style/index.less | 2 +- components/table/Table.tsx | 7 +++--- .../table/__tests__/Table.pagination.test.js | 4 ++-- components/table/hooks/useSorter.tsx | 3 ++- package.json | 2 +- tests/shared/demoTest.ts | 6 ++--- 8 files changed, 58 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 8a249ecea8..fe43768908 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,29 @@ timeline: true --- +## 4.12.0 + +- 🆕 Image.PreviewGroup add `current` prop. [#29153](https://github.com/ant-design/ant-design/pull/29153) +- InputNumber + - 🆕 InputNumber support `bordered` prop. [#29105](https://github.com/ant-design/ant-design/pull/29105) + - 🆕 InputNumber add `keyboard` prop which could disable keyboard behavior. [#29110](https://github.com/ant-design/ant-design/pull/29110) [@kerm1it](https://github.com/kerm1it) +- 💄 Darken Tag text color to enhance readability. [#29144](https://github.com/ant-design/ant-design/pull/29144) +- 💄 Fix Row with vertical `gutter` provides additional `margin-bottom` style. [#29059](https://github.com/ant-design/ant-design/pull/29059) +- 🐞 Fix Collapse header disappers with delay. [#29158](https://github.com/ant-design/ant-design/pull/29158) +- 🐞 Fix the problem that `showCount` display data is incorrect when TextArea input emoji. [#29057](https://github.com/ant-design/ant-design/pull/29057) [@HomyeeKing](https://github.com/HomyeeKing) +- 📦 Optimize ConfigProvider to avoid import all icons when tree shaking is not enabled. [#29045](https://github.com/ant-design/ant-design/pull/29045) +- 🌐 Add en-GB missing translations for table. [#29131](https://github.com/ant-design/ant-design/pull/29131) [@eberjoe](https://github.com/eberjoe) +- Table + - 🆕 Table `showSorterTooltip` now could be a object for more configuration. [#29002](https://github.com/ant-design/ant-design/pull/29002) [@harrisoff](https://github.com/harrisoff) + - ⚡️ Optimize calling sequence of `onChange` and `onSelectAll` in `rowSelection` of Table. [#29079](https://github.com/ant-design/ant-design/pull/29079) [@kerm1it](https://github.com/kerm1it) +- Badge + - 💄 Fix Badge change `count` content to hide miss style. [#29089](https://github.com/ant-design/ant-design/pull/29089) + - 🐞 Fix Badge digital animation problem. [#29100](https://github.com/ant-design/ant-design/pull/29100) +- TypeScript + - 🤖 Table TS definition update `dataSource` to `readonly`. [#29084](https://github.com/ant-design/ant-design/pull/29084) +- Less + - 💄 Add less variable `@progress-info-text-color`. [#28981](https://github.com/ant-design/ant-design/pull/28981) [@yuxuan](https://github.com/yuxuan) + ## 4.11.2 `2021-01-26` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 5513e068da..ffa8a0e392 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,29 @@ timeline: true --- +## 4.12.0 + +- 🆕 Image.PreviewGroup 添加 `current` 属性支持受控模式。[#29153](https://github.com/ant-design/ant-design/pull/29153) +- InputNumber + - 🆕 InputNumber 支持 `bordered` 属性。[#29105](https://github.com/ant-design/ant-design/pull/29105) + - 🆕 InputNumber 添加 `keyboard` 属性以支持禁用键盘行为。[#29110](https://github.com/ant-design/ant-design/pull/29110) [@kerm1it](https://github.com/kerm1it) +- 💄 加深 Tag 文字颜色以提升可读性。[#29144](https://github.com/ant-design/ant-design/pull/29144) +- 💄 修复 Row 配置垂直 `gutter` 时会额外添加 `margin-bottom` 样式的问题。[#29059](https://github.com/ant-design/ant-design/pull/29059) +- 🐞 修复 Collapse 标题区域隐藏延迟的问题。[#29158](https://github.com/ant-design/ant-design/pull/29158) +- 🐞 修复 TextArea 输入 emoji 时 `showCount` 展示数据不正确的问题。[#29057](https://github.com/ant-design/ant-design/pull/29057) [@HomyeeKing](https://github.com/HomyeeKing) +- 📦 优化 ConfigProvider 在未开启 tree shaking 的项目中引入所有图标的问题。[#29045](https://github.com/ant-design/ant-design/pull/29045) +- 🇬🇧 为表格添加 `en-GB` 翻译。[#29131](https://github.com/ant-design/ant-design/pull/29131) [@eberjoe](https://github.com/eberjoe) +- Badge + - 🐞 修复 Badge 的数字动画方向问题。[#29100](https://github.com/ant-design/ant-design/pull/29100) + - 💄 修复 Badge 修改 `count` 内容以隐藏时的样式问题。[#29089](https://github.com/ant-design/ant-design/pull/29089) +- Table + - 🆕 Table `showSorterTooltip` 属性支持 Tooltip 的配置。[#29002](https://github.com/ant-design/ant-design/pull/29002) [@harrisoff](https://github.com/harrisoff) + - ⚡️ 优化 Table `rowSelection` 中 `onChange` 和 `onSelectAll` 的调用顺序。[#29079](https://github.com/ant-design/ant-design/pull/29079) [@kerm1it](https://github.com/kerm1it) +- TypeScript + - 🤖 更新 Table TypeScript 定义 `dataSource` 至 `readonly`。[#29084](https://github.com/ant-design/ant-design/pull/29084) +- Less + - 💄 增加 less 变量 `@progress-info-text-color`。 [#28981](https://github.com/ant-design/ant-design/pull/28981) [@yuxuan](https://github.com/yuxuan) + ## 4.11.2 `2021-01-26` diff --git a/components/form/style/index.less b/components/form/style/index.less index b665b1e100..0eef0984d5 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -182,11 +182,11 @@ &-extra { clear: both; min-height: @form-item-margin-bottom; - .explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2); color: @text-color-secondary; font-size: @font-size-base; line-height: @line-height-base; transition: color 0.3s @ease-out; // sync input color transition + .explainAndExtraDistance((@form-item-margin-bottom - @form-font-height) / 2); } .@{ant-prefix}-input-textarea-show-count { diff --git a/components/table/Table.tsx b/components/table/Table.tsx index fab09c4ad8..b4aca4462a 100644 --- a/components/table/Table.tsx +++ b/components/table/Table.tsx @@ -238,10 +238,9 @@ function Table(props: TableProps) { }; /** - * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to - * read state out and then put it back to title render. Move these code into `hooks` but still - * too complex. We should provides Table props like `sorter` & `filter` to handle control in next - * big version. + * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read + * state out and then put it back to title render. Move these code into `hooks` but still too + * complex. We should provides Table props like `sorter` & `filter` to handle control in next big version. */ // ============================ Sorter ============================= diff --git a/components/table/__tests__/Table.pagination.test.js b/components/table/__tests__/Table.pagination.test.js index ebef01bff1..124efc6896 100644 --- a/components/table/__tests__/Table.pagination.test.js +++ b/components/table/__tests__/Table.pagination.test.js @@ -239,8 +239,8 @@ describe('Table.pagination', () => { }); /** - * `pagination` is not designed to accept `true` value, but in practice, many people assign - * `true` to `pagination`, since they misunderstand that `pagination` can accept a boolean value. + * `pagination` is not designed to accept `true` value, but in practice, many people assign `true` + * to `pagination`, since they misunderstand that `pagination` can accept a boolean value. */ it('Accepts pagination as true', () => { const wrapper = mount(createTable({ pagination: true })); diff --git a/components/table/hooks/useSorter.tsx b/components/table/hooks/useSorter.tsx index 9a63646589..803eef14d2 100644 --- a/components/table/hooks/useSorter.tsx +++ b/components/table/hooks/useSorter.tsx @@ -146,7 +146,8 @@ function injectSorter( } else if (nextSortOrder === ASCEND) { sortTip = triggerAsc; } - const tooltipProps: TooltipProps = typeof showSorterTooltip === 'object' ? showSorterTooltip : { title: sortTip }; + const tooltipProps: TooltipProps = + typeof showSorterTooltip === 'object' ? showSorterTooltip : { title: sortTip }; newColumn = { ...newColumn, className: classNames(newColumn.className, { [`${prefixCls}-column-sort`]: sorterOrder }), diff --git a/package.json b/package.json index 550ef768e5..7154b79df4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "4.11.2", + "version": "4.11.3", "description": "An enterprise-class UI design language and React components implementation", "title": "Ant Design", "keywords": [ diff --git a/tests/shared/demoTest.ts b/tests/shared/demoTest.ts index f7faa3c32f..e6f08103e3 100644 --- a/tests/shared/demoTest.ts +++ b/tests/shared/demoTest.ts @@ -10,9 +10,9 @@ const USE_REPLACEMENT = false; const testDist = process.env.LIB_DIR === 'dist'; /** - * Rc component will generate id for aria usage. It's created as `test-uuid` when env === 'test'. - * Or `f7fa7a3c-a675-47bc-912e-0c45fb6a74d9`(randomly) when not test env. So we need hack of this - * to modify the `aria-controls`. + * Rc component will generate id for aria usage. It's created as `test-uuid` when env === 'test'. Or + * `f7fa7a3c-a675-47bc-912e-0c45fb6a74d9`(randomly) when not test env. So we need hack of this to + * modify the `aria-controls`. */ function ariaConvert(wrapper: CheerIO) { if (!testDist || !USE_REPLACEMENT) return wrapper;