Skip to content

fix(ConfigProvider): use correct cssVar key for icon styles#56504

Merged
afc163 merged 2 commits intoant-design:masterfrom
seanparmelee:icon-styles-css-var
Jan 7, 2026
Merged

fix(ConfigProvider): use correct cssVar key for icon styles#56504
afc163 merged 2 commits intoant-design:masterfrom
seanparmelee:icon-styles-css-var

Conversation

@seanparmelee
Copy link
Contributor

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

When using AntD v6 in zero runtime mode w/ static-style-extract, we need to specify a cssVar.key so it has a deterministic value at both build time and run time. I noticed, however, that even with

extractStyle((node) => (
  <ConfigProvider theme={{ ...myTheme, cssVar: { key: 'my-css-vars' } }}>{node}</ConfigProvider>
))

the output still contains a css-var-root class with all the default theme css variables.

The root cause is the useStyle call for icon styles is executed inside the ConfigProvider component body but before the DesignTokenContext.Provider is rendered. This causes useToken() to read from the parent/default context (which has no cssVar), falling back to the hardcoded css-var-root key.

To address this, this PR moves the icon style registration into a small IconStyle component that renders inside childNode, ensuring it executes after the DesignTokenContext.Provider is established and uses the correct cssVar context.

📝 Change Log

Language Changelog
🇺🇸 English Fix ConfigProvider to ensure icon styles use correct cssVar key from theme config
🇨🇳 Chinese 修复 ConfigProvider,确保图标样式使用主题配置中正确的 cssVar 键。

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @seanparmelee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug in Ant Design's ConfigProvider that prevented icon styles from properly inheriting custom CSS variable keys defined in the theme. By adjusting the timing of icon style registration within the component's render cycle, the change ensures consistent application of user-defined CSS variable scopes, improving compatibility with zero-runtime styling solutions.

Highlights

  • Bug Fix: Incorrect CSS Variable Key for Icon Styles: Resolved an issue where icon styles within Ant Design's ConfigProvider were not correctly utilizing the cssVar.key specified in the theme configuration, particularly when using zero-runtime mode with static-style-extract. This led to icon styles defaulting to css-var-root instead of the custom key.
  • Root Cause Identified: The problem stemmed from the useStyle call for icon styles executing inside the ConfigProvider component body but before the DesignTokenContext.Provider was rendered. This caused useToken() to read from a parent/default context without the custom cssVar.
  • Solution: IconStyle Component: The fix involves refactoring the icon style registration into a new, small IconStyle React component. This component is now rendered inside the ConfigProvider's childNode, ensuring that it executes after the DesignTokenContext.Provider has been established, thereby allowing it to correctly pick up the custom cssVar context.
  • New Test Case Added: A new test case has been added to cssinjs.test.tsx to explicitly verify that icon styles correctly use the custom cssVar key from the theme configuration and do not fall back to the default css-var-root key.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

👁 Visual Regression Report for PR #56504 Failed ❌

🎯 Target branch: master (8ac5c5f)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 1 changed

Expected (Branch master) Actual (Current PR) Diff
upload-drag-sorting.compact.png upload-drag-sorting.compact.png upload-drag-sorting.compact.png upload-drag-sorting.compact.png

Important

There are 1 diffs found in this PR: 🔄 1 changed.
Please check all items:

  • Visual diff is acceptable

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Summary by CodeRabbit

发布说明

  • 改进功能

    • ConfigProvider 中的图标样式现已支持自定义 CSS 变量键名配置,允许用户通过主题配置自定义图标样式的前缀标识。
  • 测试

    • 新增测试用例验证图标样式正确使用主题配置中的自定义 CSS 变量键名,确保不会使用默认前缀。

✏️ Tip: You can customize this high-level summary in your review settings.

功能概述

本次变更在 ConfigProvider 中重构了图标样式的处理逻辑,将直接的 useStyle 调用提取为独立的 IconStyle 组件,并添加新的测试用例验证自定义 CSS 变量键的正确应用。

变更清单

文件群组 变更摘要
测试覆盖
components/config-provider/__tests__/cssinjs.test.tsx
新增测试用例验证icon样式在配置自定义cssVar.key时,生成的样式包含自定义键名(如.custom-css-var),不包含默认的.css-var-root
核心逻辑重构
components/config-provider/index.tsx
创建新的IconStyle组件封装useStyle调用逻辑,将其从ProviderChildren函数体内提取为独立组件并插入渲染树,保持运行时效果不变

代码审查工作量

🎯 2 (Simple) | ⏱️ ~8 分钟

庆祝诗

🐰 图标样式换新装,
组件萃取更优雅,
自定义键轻轻放,
测试守护不遗漏,
清爽代码绽光芒✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了PR的主要改动,即修复ConfigProvider以使用正确的cssVar键来处理图标样式。
Description check ✅ Passed 描述清晰地说明了问题背景、根本原因以及解决方案,与代码变更直接相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively resolves an issue where icon styles did not respect the cssVar.key from the theme configuration in ConfigProvider. The approach of creating a dedicated IconStyle component and rendering it within the DesignTokenContext.Provider is a clean and correct solution. The added test case is also valuable for preventing future regressions. I've added one suggestion for a minor performance optimization by memoizing the new IconStyle component.

Copy link
Contributor

@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 (2)
components/config-provider/index.tsx (1)

94-104: 组件实现正确,建议添加性能优化。

IconStyle 组件结构正确,注释清晰地解释了其目的。由于 iconPrefixClscsp 通常不会频繁变化,建议使用 React.memo 包装该组件以避免不必要的重新渲染。

🔎 建议的性能优化
 /**
  * This component registers icon styles inside the DesignTokenContext.Provider
  * so that CSS variables use the correct cssVar key from the theme config.
  */
-const IconStyle: React.FC<{ iconPrefixCls: string; csp?: CSPConfig }> = ({
+const IconStyle: React.FC<{ iconPrefixCls: string; csp?: CSPConfig }> = React.memo(({
   iconPrefixCls,
   csp,
 }) => {
   useStyle(iconPrefixCls, csp);
   return null;
-};
+});
components/config-provider/__tests__/cssinjs.test.tsx (1)

99-124: 测试用例实现良好,验证了修复效果。

该测试用例成功验证了图标样式使用正确的 cssVar.key 配置:

  • 正向断言:确认包含自定义的 .custom-css-var
  • 反向断言:确认不包含默认的 .css-var-root

测试遵循了文件中其他测试的模式,断言清晰且注释有帮助。

可选的测试增强建议

可以考虑添加以下测试场景以提高覆盖率:

  1. 验证图标是否实际渲染:
const { container } = render(
  <ConfigProvider theme={{ cssVar: { key: 'custom-css-var' } }}>
    <SmileOutlined />
  </ConfigProvider>,
);
expect(container.querySelector('.anticon')).toBeTruthy();
  1. 测试未提供 cssVar 时的默认行为,确保向后兼容性:
it('icon styles should use default cssVar key when not configured', () => {
  render(
    <ConfigProvider>
      <SmileOutlined />
    </ConfigProvider>,
  );
  
  const dynamicStyles = Array.from(document.querySelectorAll('style[data-css-hash]'));
  expect(
    dynamicStyles.some((style) => style.innerHTML.includes('.css-var-root')),
  ).toBeTruthy();
});
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4b105c and 53fb686.

📒 Files selected for processing (2)
  • components/config-provider/__tests__/cssinjs.test.tsx
  • components/config-provider/index.tsx
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Always use TypeScript with strict type checking
Never use any type - define precise types instead
Use interfaces (not type aliases) for object structures
Export all public interface types
Prefer union types over enums, use as const for constants
Use early returns to improve readability
Support tree shaking
Follow import order: React → dependencies → antd components → custom components → types → styles
Prefer antd built-in components over external dependencies
Pass all ESLint and TypeScript checks
No console errors or warnings

**/*.{ts,tsx}: Use TypeScript and React to develop, with function-based components and hooks instead of class components
Use early returns to improve code readability
Component names should use PascalCase
Property names should use camelCase
Use React.memo, useMemo, and useCallback appropriately to optimize performance
All components and functions must provide accurate type definitions; avoid using any type and use interfaces instead of type aliases for object structures
Component props should use interface definition with naming convention ComponentNameProps; define separate interfaces for component state like ComponentNameState
Use React.ForwardRefRenderFunction for component ref types and explicitly define all callback function parameters and return values
Use generics appropriately to enhance type flexibility; use union types and as const instead of enum; rely on TypeScript's type inference and minimize type assertions
Internationalization: obtain locale configuration via useLocale hook from components/locale/index.tsx; ensure new locale configurations have corresponding type definitions

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
components/**/*.tsx

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

components/**/*.tsx: Component props interfaces should be named ComponentNameProps
Component ref types should use React.ForwardRefRenderFunction
Use functional components with hooks exclusively (no class components)
Apply performance optimizations with React.memo, useMemo, useCallback appropriately
Support server-side rendering
Components must support ref forwarding with structure including nativeElement, focus, and other methods
Use PascalCase for component names
Use camelCase for props with specific patterns: default + PropName for defaults, forceRender for force rendering, open instead of visible for panel state, show + PropName for display toggles, PropName + able for capabilities, dataSource for data source, disabled for disabled state, extra for additional content, icon for icons, trigger for triggers, className for CSS classes
Use on + EventName pattern for event handlers (e.g., onClick, onChange)
Use on + SubComponentName + EventName pattern for sub-component events
Use complete names, never abbreviations in prop naming
Optimize for minimal re-renders
Use useLocale hook from components/locale/index.tsx
Support accessibility (WCAG 2.1 AA)

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Never hardcode colors, sizes, or spacing values

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
**/*.{ts,tsx,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use 2-space indentation

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
**/*.{ts,tsx,css}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Maintain cross-browser compatibility

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/*.tsx: Use @ant-design/cssinjs as the styling solution; place component styles in style/ directory with filenames following gen[ComponentName]Style naming convention
Use CSS-in-JS and avoid hardcoded colors, sizes, and spacing values; base component styles on global and component-level design tokens
Components must support dark mode, different screen sizes, and RTL (right-to-left) reading direction; use CSS logical properties like margin-inline-start instead of directional properties
Use CSS transitions for simple animations and @rc-component/motion for complex animations; respect prefers-reduced-motion user preference
Follow WCAG 2.1 AA accessibility standards: ensure clear focus states, sufficient color contrast, avoid color-only information conveyance, support 200% page zoom, and avoid flickering animations

Files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
**/__tests__/**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/__tests__/**/*.test.{ts,tsx}: Write comprehensive tests using Jest and React Testing Library
Include snapshot tests for UI components

Files:

  • components/config-provider/__tests__/cssinjs.test.tsx
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Jest and React Testing Library for unit tests; place test files in tests directory with naming format index.test.tsx or xxx.test.tsx; achieve 100% test coverage

Files:

  • components/config-provider/__tests__/cssinjs.test.tsx
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/style/*.ts : Use design tokens from the Ant Design token system
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T15:16:45.886Z
Learning: Applies to **/*.tsx : Use CSS-in-JS and avoid hardcoded colors, sizes, and spacing values; base component styles on global and component-level design tokens
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T15:16:45.886Z
Learning: Applies to CHANGELOG.*.md : CHANGELOG format: `Component: 📌emoji Description [#PR](link) [contributor]`; use code backticks for all property names, method names, APIs, and aria/role attributes; maintain space between Chinese/English and numbers/links/usernames
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/style/*.ts : Use `ant-design/cssinjs` for all styling

Applied to files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2026-01-04T15:16:45.886Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T15:16:45.886Z
Learning: Applies to **/*.tsx : Use CSS-in-JS and avoid hardcoded colors, sizes, and spacing values; base component styles on global and component-level design tokens

Applied to files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2026-01-04T15:16:45.886Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T15:16:45.886Z
Learning: Applies to **/*.tsx : Use ant-design/cssinjs as the styling solution; place component styles in `style/` directory with filenames following `gen[ComponentName]Style` naming convention

Applied to files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/style/*.ts : Use design tokens from the Ant Design token system

Applied to files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2025-06-28T20:50:03.555Z
Learnt from: li-jia-nan
Repo: ant-design/ant-design PR: 54219
File: .dumi/theme/builtins/RefinedChangelog/index.tsx:65-65
Timestamp: 2025-06-28T20:50:03.555Z
Learning: React 19 introduces a simplified Context provider syntax that allows using Context objects directly (e.g., `<ChangelogContext value={...}>`) instead of requiring the `.Provider` suffix (e.g., `<ChangelogContext.Provider value={...}>`).

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/style/*.ts : Generate styles with functions named `gen[ComponentName]Style`

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-06-28T20:50:03.555Z
Learnt from: li-jia-nan
Repo: ant-design/ant-design PR: 54219
File: .dumi/theme/builtins/RefinedChangelog/index.tsx:65-65
Timestamp: 2025-06-28T20:50:03.555Z
Learning: React 19 introduces simplified Context provider syntax allowing direct usage of Context objects (e.g., `<MyContext value={...}>`) instead of requiring `.Provider` suffix (e.g., `<MyContext.Provider value={...}>`). The old `.Provider` syntax will be deprecated in future React versions.

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Place component styles in `style/` directory

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-11-13T02:52:08.942Z
Learnt from: meet-student
Repo: ant-design/ant-design PR: 55697
File: components/drawer/index.tsx:86-88
Timestamp: 2025-11-13T02:52:08.942Z
Learning: In Ant Design components (components/**/*.{ts,tsx}), always use `import useId from 'rc-util/lib/hooks/useId'` instead of `React.useId()` for generating unique IDs, to ensure compatibility with React 16-19. The rc-util hook automatically uses the native implementation in React 18+ and provides a fallback for older versions.

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/*.{ts,tsx} : Never hardcode colors, sizes, or spacing values

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2026-01-04T15:16:45.886Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-04T15:16:45.886Z
Learning: Follow Ant Design design specification and adhere to the design token system throughout the project

Applied to files:

  • components/config-provider/index.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to components/**/style/*.ts : Support both light and dark themes

Applied to files:

  • components/config-provider/index.tsx
  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to **/__tests__/**/*.test.{ts,tsx} : Include snapshot tests for UI components

Applied to files:

  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to **/*.{ts,tsx,css} : Maintain cross-browser compatibility

Applied to files:

  • components/config-provider/__tests__/cssinjs.test.tsx
📚 Learning: 2025-11-24T16:30:28.374Z
Learnt from: CR
Repo: ant-design/ant-design PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T16:30:28.374Z
Learning: Applies to **/__tests__/**/*.test.{ts,tsx} : Write comprehensive tests using Jest and React Testing Library

Applied to files:

  • components/config-provider/__tests__/cssinjs.test.tsx
🧬 Code graph analysis (2)
components/config-provider/index.tsx (2)
components/config-provider/context.ts (1)
  • CSPConfig (84-86)
.dumi/theme/slots/Content/DocAnchor.tsx (1)
  • useStyle (8-61)
components/config-provider/__tests__/cssinjs.test.tsx (2)
components/badge/demo/component-token.tsx (1)
  • ConfigProvider (6-32)
.dumi/scripts/mirror-notify.js (1)
  • style (31-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: build preview
  • GitHub Check: test-react-latest (dom, 1/2)
  • GitHub Check: test lib/es module (es, 2/2)
  • GitHub Check: test lib/es module (es, 1/2)
  • GitHub Check: test-react-legacy (18, 1/2)
  • GitHub Check: test lib/es module (lib, 2/2)
  • GitHub Check: test-react-legacy (18, 2/2)
  • GitHub Check: build
  • GitHub Check: test-node
  • GitHub Check: lint
  • GitHub Check: test-react-latest (dom, 2/2)
  • GitHub Check: visual-diff snapshot (2/2)
  • GitHub Check: visual-diff snapshot (1/2)
  • GitHub Check: build
  • GitHub Check: size
🔇 Additional comments (1)
components/config-provider/index.tsx (1)

604-604: 组件放置位置正确。

IconStyle 组件被正确地放置在 childNode 中,确保它在 DesignTokenContext.Provider(第 701-705 行)建立后渲染。这样可以保证 useStyle 钩子能够访问到正确的 cssVar 配置,修复了图标样式使用默认 CSS 变量键的问题。

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 6, 2026

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8ac5c5f) to head (adc5d31).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##            master    #56504     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files          807       805      -2     
  Lines        17819     14847   -2972     
  Branches      5107      3920   -1187     
===========================================
- Hits         17819     14847   -2972     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Bundle Report

Changes will increase total bundle size by 3.05kB (0.03%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 11.99MB 3.05kB (0.03%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.js 1.53kB 6.3MB 0.02%
antd.js 1.53kB 5.69MB 0.03%

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 7, 2026
@afc163 afc163 merged commit 4888842 into ant-design:master Jan 7, 2026
39 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

钉钉社区群二维码

@zombieJ zombieJ mentioned this pull request Jan 13, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants