Skip to content

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Feb 8, 2025

close ant-design/ant-design#52282 (comment)

Summary by CodeRabbit

  • 重构
    • 调整了内部引用处理逻辑,以支持 React 19,采用版本判断方式替代之前的属性检测方法,确保在新版 React 环境下正常工作。
  • 测试
    • supportRef 函数添加了新测试用例,以验证在未提供 ref 的情况下的行为。

Copy link

vercel bot commented Feb 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
util ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 6:44am

Copy link

coderabbitai bot commented Feb 8, 2025

Walkthrough

此次提交针对 src/ref.ts 中的 supportRef 函数进行了修改。原先通过检测 nodeOrComponent 是否存在可枚举的 'ref' 属性来判断引用支持性,现在改为判断所使用的 React 版本是否以 "19." 开头。除了这一改变之外,函数的整体逻辑和控制流程均保持不变。

Changes

文件路径 改动摘要
src/ref.ts 修改 supportRef 函数:将检测节点上 'ref' 属性改为检测 React 版本是否以 "19." 开头。
tests/ref-19.test.tsx 添加新的测试用例以验证 supportRef 函数在未提供 ref 时的行为。

Sequence Diagram(s)

sequenceDiagram
  participant 调用者 as Caller
  participant 支持函数 as supportRef
  participant React as React 版本

  调用者->>支持函数: 调用 supportRef(nodeOrComponent)
  支持函数->>React: 获取 React 版本信息
  alt 版本以 "19." 开头
    支持函数-->>调用者: 返回 true
  else
    支持函数-->>调用者: 检查 nodeOrComponent 的 'ref' 属性
  end
Loading

Assessment against linked issues

Objective Addressed Explanation
允许 Antd 5.23 Dropdown 正确渲染自定义组件,无需 forwardRef [#52282]

Poem

我是小兔在此庆贺,
代码跃动似草原风,
版本检测轻轻一跳,
引用问题烟消云散,
快乐编程共筑梦 🐰
跳跃间散播无限希望!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
src/ref.ts (1)

1-1: 修复类型导入问题

当前的类型导入方式阻止了对 React.version 的访问。需要将 type-only 导入改为常规导入。

建议应用以下修改:

-import type * as React from 'react';
+import * as React from 'react';

Also applies to: 48-48

🧹 Nitpick comments (1)
src/ref.ts (1)

40-75: 完善版本兼容性文档

建议在函数文档中添加版本兼容性说明,以帮助使用者理解不同 React 版本下的行为差异。

建议在函数开头添加以下文档:

+/**
+ * 检查组件是否支持 ref
+ * @param nodeOrComponent - 要检查的节点或组件
+ * @returns 是否支持 ref
+ * 
+ * @version
+ * - React 19.x: 所有 React 元素都支持 ref
+ * - React 16.x-18.x: 需要通过 forwardRef 或类组件支持
+ */
 export const supportRef = (nodeOrComponent: any): boolean => {
🧰 Tools
🪛 GitHub Check: CodeQL

[failure] 48-48: Property access on null or undefined
The base expression of this property access is always undefined.

🪛 GitHub Actions: ✅ test

[error] 48-48: 'React' cannot be used as a value because it was imported using 'import type'.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c00fea and 99d8344.

📒 Files selected for processing (1)
  • src/ref.ts (1 hunks)
🧰 Additional context used
🪛 GitHub Check: CodeQL
src/ref.ts

[failure] 48-48: Property access on null or undefined
The base expression of this property access is always undefined.

🪛 GitHub Actions: ✅ test
src/ref.ts

[error] 48-48: 'React' cannot be used as a value because it was imported using 'import type'.

🔇 Additional comments (1)
src/ref.ts (1)

45-51: 🛠️ Refactor suggestion

优化 React 版本检查逻辑

当前的版本检查方式存在以下问题:

  1. 假设所有 19.x 版本都支持此特性
  2. 没有处理 React.version 可能为 undefined 的情况
  3. 对未来版本的兼容性存在隐患

建议改进实现方式:

  if (
    isReactElement(nodeOrComponent) &&
-   React.version.startsWith('19.')
+   React.version?.split('.')?.[0] === '19'
  ) {
    return true;
  }
✅ Verification successful

🌐 Web query:

React 19 中 ref 的处理方式有什么变化?是否所有 19.x 版本都支持这个新特性?

💡 Result:

React 19 对 `ref` 的处理进行了重大改进,简化了函数组件中的使用方式并引入了新功能。以下是主要变化及版本支持情况:

### `ref` 处理的核心变化
1. **函数组件直接接收 `ref` 属性**
   - 不再需要 `forwardRef` 包裹函数组件
   - 可直接通过 props 接收 `ref`:
     ```jsx
     function MyInput({ placeholder, ref }) {
       return <input placeholder={placeholder} ref={ref} />
     }
     ```
     [1][2][5][6]

2. **弃用 `forwardRef`**
   - React 团队已提供 codemod 工具自动迁移旧代码
   - 未来版本将完全移除该 API [1][5][8]

3. **类组件的特殊处理**
   - `ref` 不会作为 props 传递给类组件(仍指向组件实例)[1][7]

4. **新的 ref 清理机制**
   - ref 回调可返回清理函数(替代旧的传 `null` 模式)
     ```jsx
     <div ref={(el) => {
       // 挂载时执行
       return () => { /* 卸载时执行的清理逻辑 */ }
     }} />
     ```
   - TypeScript 现在强制要求显式处理返回值 [3][7]

### 版本支持情况
- **全版本兼容**:这些改进从 React v19.0.0 开始提供支持
- **逐步弃用策略**:
  1. `forwardRef` 在 v19.x 系列中仍可用(但会显示弃用警告)
  2. refs 传 `null` 的旧模式将在后续小版本中被禁用 [1][7]
  
### TypeScript 适配要求
- ref 回调必须使用显式返回语句:
```diff
- <div ref={el => (this.element = el)} />
+ <div ref={el => { this.element = el }} />
```
可通过官方提供的 `no-implicit-ref-callback-return` codemod 自动转换 [1][7]

这些改进旨在简化 refs 的使用流程并减少样板代码,所有 React v19.x 系列版本均原生支持新特性。开发者在升级时应注意官方提供的 codemod 工具和类型检查提示来完成平稳迁移。

Citations:

- 1: https://zh-hans.react.dev/blog/2024/12/05/react-19
- 2: https://sorrycc.com/react-19/
- 3: https://juejin.cn/post/7457465059905880073
- 4: https://blog.csdn.net/2401_86337335/article/details/142755570
- 5: https://juejin.cn/post/7445236889647349811
- 6: https://www.51cto.com/article/787273.html
- 7: https://reactjs.ac.cn/blog/2024/12/05/react-19
- 8: https://blog.csdn.net/React_Community/article/details/144361551
- 9: https://blog.csdn.net/xgangzai/article/details/144335337
- 10: https://juejin.cn/post/7366526529521008652

优化 React 版本检查逻辑

当前的版本检查方式存在问题:

  • 直接调用 React.version.startsWith('19.') 在 React.version 为 undefined 时会报错;
  • 依赖 startsWith 方法可能不能严格保证只匹配主版本号,长期来看存在隐患。

鉴于 React 19 系列自 19.0.0 起均支持新特性,建议采取如下改进方案,以确保:

  • 安全处理可能为 undefined 的 React.version;
  • 更精确地只判断主版本号是否为 19。

改进方案:

  if (
    isReactElement(nodeOrComponent) &&
-   React.version.startsWith('19.')
+   React.version?.split('.')?.[0] === '19'
  ) {
    return true;
  }
🧰 Tools
🪛 GitHub Check: CodeQL

[failure] 48-48: Property access on null or undefined
The base expression of this property access is always undefined.

🪛 GitHub Actions: ✅ test

[error] 48-48: 'React' cannot be used as a value because it was imported using 'import type'.

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.11%. Comparing base (6c00fea) to head (4ac8edc).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #623      +/-   ##
==========================================
+ Coverage   90.01%   90.11%   +0.10%     
==========================================
  Files          36       36              
  Lines         881      880       -1     
  Branches      290      302      +12     
==========================================
  Hits          793      793              
+ Misses         86       85       -1     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/ref-19.test.tsx (1)

80-94: 建议增强测试覆盖率

当前测试用例有以下几点可以改进:

  1. 测试名称建议更具描述性,比如 supportRef should return true for functional components in React 19
  2. 缺少以下场景的测试:
    • 组件显式提供 ref prop 的情况
    • 类组件的情况
    • 无效组件的错误处理

建议添加如下测试用例:

+  it('supportRef with explicit ref prop', () => {
+    const Demo = React.forwardRef<HTMLDivElement>((_, ref) => <div ref={ref} />);
+
+    const Checker = ({ children }: { children: React.ReactElement }) => {
+      return <p>{String(supportRef(children))}</p>;
+    };
+
+    const { container } = render(
+      <Checker>
+        <Demo />
+      </Checker>,
+    );
+
+    expect(container.querySelector('p')?.textContent).toBe('true');
+  });
+
+  it('supportRef with class component', () => {
+    class Demo extends React.Component {
+      render() {
+        return <div />;
+      }
+    }
+
+    const Checker = ({ children }: { children: React.ReactElement }) => {
+      return <p>{String(supportRef(children))}</p>;
+    };
+
+    const { container } = render(
+      <Checker>
+        <Demo />
+      </Checker>,
+    );
+
+    expect(container.querySelector('p')?.textContent).toBe('true');
+  });
+
+  it('supportRef with invalid element', () => {
+    const Checker = ({ children }: { children: any }) => {
+      return <p>{String(supportRef(children))}</p>;
+    };
+
+    const { container } = render(
+      <Checker>
+        {null}
+      </Checker>,
+    );
+
+    expect(container.querySelector('p')?.textContent).toBe('false');
+  });
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b26f068 and 4ac8edc.

📒 Files selected for processing (2)
  • src/ref.ts (2 hunks)
  • tests/ref-19.test.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/ref.ts
🔇 Additional comments (1)
tests/ref-19.test.tsx (1)

3-3: 导入语句看起来不错!

新增的 supportRef 导入与相关的 ref 工具函数放在一起,符合代码组织规范。

@zombieJ zombieJ merged commit 416309b into master Feb 8, 2025
12 checks passed
@zombieJ zombieJ deleted the afc163-patch-1 branch February 8, 2025 06:55
zombieJ added a commit that referenced this pull request Feb 8, 2025
* fix: ref could be passed as a prop in 19.x

close ant-design/ant-design#52282

* Update ref.ts

* test: add test case

---------

Co-authored-by: 二货机器人 <smith3816@gmail.com>
github-merge-queue bot pushed a commit to jaegertracing/jaeger-ui that referenced this pull request Feb 11, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [antd](https://ant.design)
([source](https://redirect.github.com/ant-design/ant-design)) |
[`5.23.3` ->
`5.24.0`](https://renovatebot.com/diffs/npm/antd/5.23.3/5.24.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/antd/5.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/antd/5.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/antd/5.23.3/5.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/antd/5.23.3/5.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ant-design/ant-design (antd)</summary>

###
[`v5.24.0`](https://redirect.github.com/ant-design/ant-design/releases/tag/5.24.0)

[Compare
Source](https://redirect.github.com/ant-design/ant-design/compare/5.23.4...5.24.0)

- 🆕 Notification support `actions` prop and deprecated `btn` prop.
[#&#8203;52703](https://redirect.github.com/ant-design/ant-design/pull/52703)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🆕 Carousel support show dot duration.
[#&#8203;52672](https://redirect.github.com/ant-design/ant-design/pull/52672)
[@&#8203;yellowryan](https://redirect.github.com/yellowryan)
- 🆕 Input.OTP support `separator` prop.
[#&#8203;52668](https://redirect.github.com/ant-design/ant-design/pull/52668)
[@&#8203;HaceraI](https://redirect.github.com/HaceraI)
- 🆕 Descriptions add `labelColor` component token.
[#&#8203;52700](https://redirect.github.com/ant-design/ant-design/pull/52700)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🆕 Segmented supports `shape="round"`.
[#&#8203;52685](https://redirect.github.com/ant-design/ant-design/pull/52685)
[@&#8203;afc163](https://redirect.github.com/afc163)
- 🆕 ConfigProvider support `variant` for Card.
[#&#8203;52552](https://redirect.github.com/ant-design/ant-design/pull/52552)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🆕 Progress/Step supports custom rounding with `rounding` prop.
[#&#8203;52017](https://redirect.github.com/ant-design/ant-design/pull/52017)
[@&#8203;yanghoxom](https://redirect.github.com/yanghoxom)
- 🆕 Divider `orientation` support `start` and `end`.
[#&#8203;52567](https://redirect.github.com/ant-design/ant-design/pull/52567)
[@&#8203;li-jia-nan](https://redirect.github.com/li-jia-nan)
- 🆕 Add `underlined` to `variant` of Input, InputNumber, Mentions, Form,
Select, Cascader, TreeSelect, DatePicker and TimePicker.
[#&#8203;52546](https://redirect.github.com/ant-design/ant-design/pull/52546)
[@&#8203;ustcfury](https://redirect.github.com/ustcfury)
- 🆕 ConfigProvider support global config of Modal `centered` .
[#&#8203;52343](https://redirect.github.com/ant-design/ant-design/pull/52343)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🆕 Add `label` class name for Checkbox and Radio.
[#&#8203;52322](https://redirect.github.com/ant-design/ant-design/pull/52322)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🐞 Fix Tooltip/Popover/Popconfirm/Dropdown misaligned popup positions
with custom children in React 19.
[react-component/util#623](https://redirect.github.com/react-component/util/pull/623)
[@&#8203;zombieJ](https://redirect.github.com/zombieJ)
- 🐞 Fix DatePicker.RangePicker arrow position when popup auto adjust
position.
[#&#8203;52719](https://redirect.github.com/ant-design/ant-design/pull/52719)
[@&#8203;zombieJ](https://redirect.github.com/zombieJ)
- 🐞 Update locale `filterCheckall` to `filterCheckAll`.
[#&#8203;52517](https://redirect.github.com/ant-design/ant-design/pull/52517)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🐞 Fix Form that `scrollToField` and `scrollToFirstError` cannot focus
components of antd.
[#&#8203;52726](https://redirect.github.com/ant-design/ant-design/pull/52726)
[@&#8203;Wxh16144](https://redirect.github.com/Wxh16144)
- 💄 Fix Button shadow color appearing awkward on dark backgrounds.
[#&#8203;52701](https://redirect.github.com/ant-design/ant-design/pull/52701)
[@&#8203;afc163](https://redirect.github.com/afc163)
- 💄 Fixed the unnatural animation transition effect of Segmented
component in dark mode.
[#&#8203;52708](https://redirect.github.com/ant-design/ant-design/pull/52708)
[@&#8203;yellowryan](https://redirect.github.com/yellowryan)
- 💄 Separate style of Input and TextArea.
[#&#8203;52570](https://redirect.github.com/ant-design/ant-design/pull/52570)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 💄 Fix Input and Select style issue under css var mode.
[#&#8203;52554](https://redirect.github.com/ant-design/ant-design/pull/52554)
[@&#8203;li-jia-nan](https://redirect.github.com/li-jia-nan)
- ⌨️ Remove role="alert" from Form field error to improve screen reader
experience.
[#&#8203;52661](https://redirect.github.com/ant-design/ant-design/pull/52661)
[@&#8203;mellis481](https://redirect.github.com/mellis481)
- ⌨️ Improve accessibility by adding localized labels for empty table
header and panel buttons.
[#&#8203;52689](https://redirect.github.com/ant-design/ant-design/pull/52689)
[@&#8203;aojunhao123](https://redirect.github.com/aojunhao123)
- ⌨️ Improve Tabs accessibility by fixing error `Certain ARIA roles must
contain particular children`.
[#&#8203;52677](https://redirect.github.com/ant-design/ant-design/pull/52677)
[@&#8203;afc163](https://redirect.github.com/afc163)
- ⌨️ Add screen reader support for Tooltip.
[#&#8203;52293](https://redirect.github.com/ant-design/ant-design/pull/52293)
[@&#8203;aojunhao123](https://redirect.github.com/aojunhao123)
-   TypeScript
- 🤖 Separate type of Button `onClick` event by `href`.
[#&#8203;52654](https://redirect.github.com/ant-design/ant-design/pull/52654)
[@&#8203;Brew-Brew](https://redirect.github.com/Brew-Brew)
- 🤖 Deprecate Button.Group, prefer Space.Compact.
[#&#8203;52572](https://redirect.github.com/ant-design/ant-design/pull/52572)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🤖 Deprecate Input.Group, prefer Space.Compact.
[#&#8203;52571](https://redirect.github.com/ant-design/ant-design/pull/52571)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🤖 Tooltip export TooltipRef type.
[#&#8203;49230](https://redirect.github.com/ant-design/ant-design/pull/49230)
[@&#8203;nuintun](https://redirect.github.com/nuintun)

***

- 🆕 Notification 支持 `actions` 属性并废弃 `btn`
属性。[#&#8203;52703](https://redirect.github.com/ant-design/ant-design/pull/52703)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🆕 Carousel
支持展示指示点进度。[#&#8203;52672](https://redirect.github.com/ant-design/ant-design/pull/52672)
[@&#8203;yellowryan](https://redirect.github.com/yellowryan)
- 🆕 Input.OTP 支持 `separator`
属性。[#&#8203;52668](https://redirect.github.com/ant-design/ant-design/pull/52668)
[@&#8203;HaceraI](https://redirect.github.com/HaceraI)
- 🆕 Descriptions 增加 `labelColor` 组件
token。[#&#8203;52700](https://redirect.github.com/ant-design/ant-design/pull/52700)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🆕 Segmented 支持 `shape="round"`
的胶囊形状的样式。[#&#8203;52685](https://redirect.github.com/ant-design/ant-design/pull/52685)
[@&#8203;afc163](https://redirect.github.com/afc163)
- 🆕 ConfigProvider 支持 Card 组件的 `variant`
配置。[#&#8203;52552](https://redirect.github.com/ant-design/ant-design/pull/52552)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🆕 Progress/Step 支持使用 `rounding`
属性自定义取整方法。[#&#8203;52017](https://redirect.github.com/ant-design/ant-design/pull/52017)
[@&#8203;yanghoxom](https://redirect.github.com/yanghoxom)
- 🆕 Divider 的 `orientation` 属性支持 `start` 和
`end`.[#&#8203;52567](https://redirect.github.com/ant-design/ant-design/pull/52567)
[@&#8203;li-jia-nan](https://redirect.github.com/li-jia-nan)
- 🆕 为
Input、InputNumber、Mentions、Form、Select、Cascader、TreeSelect、DatePicker、TimePicker
组件的 `variant` 添加 `underlined`
属性。[#&#8203;52546](https://redirect.github.com/ant-design/ant-design/pull/52546)
[@&#8203;ustcfury](https://redirect.github.com/ustcfury)
- 🆕 ConfigProvider 支持 Modal `centered`
全局配置。[#&#8203;52343](https://redirect.github.com/ant-design/ant-design/pull/52343)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🆕 为 Checkbox 和 Radio 增加 `label`
类名。[#&#8203;52322](https://redirect.github.com/ant-design/ant-design/pull/52322)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🐞 修复 Tooltip/Popover/Popconfirm/Dropdown 在 React 19 下 children
为自定义组件时弹层位置错乱的问题。[react-component/util#623](https://redirect.github.com/react-component/util/pull/623)
[@&#8203;zombieJ](https://redirect.github.com/zombieJ)
- 🐞 修复 DatePicker.RangePicker
弹出窗体自动调整位置时,面板的箭头位置不正确的问题。[#&#8203;52719](https://redirect.github.com/ant-design/ant-design/pull/52719)
[@&#8203;zombieJ](https://redirect.github.com/zombieJ)
- 🐞 修正 locale 中 `filterCheckall` 为
`filterCheckAll`。[#&#8203;52517](https://redirect.github.com/ant-design/ant-design/pull/52517)
[@&#8203;thinkasany](https://redirect.github.com/thinkasany)
- 🐞 修复 Form `scrollToField` 和 `scrollToFirstError` 无法聚焦 antd
组件的问题。[#&#8203;52726](https://redirect.github.com/ant-design/ant-design/pull/52726)
[@&#8203;Wxh16144](https://redirect.github.com/Wxh16144)
- 💄 修复 Button
预设值按钮的阴影色在暗色背景下显示突兀的问题。[#&#8203;52701](https://redirect.github.com/ant-design/ant-design/pull/52701)
[@&#8203;afc163](https://redirect.github.com/afc163)
- 💄 修复 Segmented
组件在暗黑模式下的动画过渡效果不自然的问题。[#&#8203;52708](https://redirect.github.com/ant-design/ant-design/pull/52708)
[@&#8203;yellowryan](https://redirect.github.com/yellowryan)
- 💄 拆分 Input 和 TextArea
样式。[#&#8203;52570](https://redirect.github.com/ant-design/ant-design/pull/52570)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 💄 修复 Input 和 Select 在 css var
模式下的样式问题。[#&#8203;52554](https://redirect.github.com/ant-design/ant-design/pull/52554)
[@&#8203;li-jia-nan](https://redirect.github.com/li-jia-nan)
- ⌨️ Form field error 移除 role="alert"
以提升可访问性。[#&#8203;52661](https://redirect.github.com/ant-design/ant-design/pull/52661)
[@&#8203;mellis481](https://redirect.github.com/mellis481)
- ⌨️
优化无障碍体验,为空表头和面板按钮添加本地化标签。[#&#8203;52689](https://redirect.github.com/ant-design/ant-design/pull/52689)
[@&#8203;aojunhao123](https://redirect.github.com/aojunhao123)
- ⌨️ 优化 Tabs 组件的可访问性,修复 `Certain ARIA roles must contain particular
children`
的报错。[#&#8203;52677](https://redirect.github.com/ant-design/ant-design/pull/52677)
[@&#8203;afc163](https://redirect.github.com/afc163)
- ⌨️ 为 Tooltip
添加读屏器支持。[#&#8203;52293](https://redirect.github.com/ant-design/ant-design/pull/52293)
[@&#8203;aojunhao123](https://redirect.github.com/aojunhao123)
-   TypeScript
- 🤖 Button 根据 `href` 属性区分 `onClick`
事件类型。[#&#8203;52654](https://redirect.github.com/ant-design/ant-design/pull/52654)
[@&#8203;Brew-Brew](https://redirect.github.com/Brew-Brew)
- 🤖 废弃 Button.Group, 推荐
Space.Compact。[#&#8203;52572](https://redirect.github.com/ant-design/ant-design/pull/52572)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🤖 废弃 Input.Group,推荐
Space.Compact。[#&#8203;52571](https://redirect.github.com/ant-design/ant-design/pull/52571)
[@&#8203;guoyunhe](https://redirect.github.com/guoyunhe)
- 🤖 Tooltip 导出 TooltipRef
类型。[#&#8203;49230](https://redirect.github.com/ant-design/ant-design/pull/49230)
[@&#8203;nuintun](https://redirect.github.com/nuintun)

###
[`v5.23.4`](https://redirect.github.com/ant-design/ant-design/releases/tag/5.23.4)

[Compare
Source](https://redirect.github.com/ant-design/ant-design/compare/5.23.3...5.23.4)

蛇年第一个版本,开工大吉!🐍

- 🐞 修复 `Pagination` 可访问性问题,补充缺失的 ARIA
属性支持。[#&#8203;52616](https://redirect.github.com/ant-design/ant-design/pull/52616)
[@&#8203;aojunhao123](https://redirect.github.com/aojunhao123)
- 🐞 Space.Compact 支持 textarea
组件。[#&#8203;52639](https://redirect.github.com/ant-design/ant-design/pull/52639)
[@&#8203;Can-Chen](https://redirect.github.com/Can-Chen)
- 🐞 修复 Menu `theme="dark"`
时水平菜单的文字色和背景色同色的问题。[#&#8203;52617](https://redirect.github.com/ant-design/ant-design/pull/52617)
[@&#8203;afc163](https://redirect.github.com/afc163)
- 🇪🇬 Tour 增加阿拉伯文(埃及) (ar_EG) 的翻译。
[#&#8203;52642](https://redirect.github.com/ant-design/ant-design/pull/52642)
[@&#8203;Sagie501](https://redirect.github.com/Sagie501)
- 🇮🇱 Tour
增加以色列的国际化翻译。[#&#8203;52641](https://redirect.github.com/ant-design/ant-design/pull/52641)
[@&#8203;Sagie501](https://redirect.github.com/Sagie501)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/jaegertracing/jaeger-ui).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJjaGFuZ2Vsb2c6ZGVwZW5kZW5jaWVzIl19-->

---------

Signed-off-by: Mend Renovate <bot@renovateapp.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Yuri Shkuro <github@ysh.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Antd 5.23 Dropdown misplaces/flashes children unless forwardRef is used
2 participants