Skip to content

fix: Collapse items semantic props#56517

Merged
meet-student merged 1 commit intomasterfrom
fix-collapse
Jan 7, 2026
Merged

fix: Collapse items semantic props#56517
meet-student merged 1 commit intomasterfrom
fix-collapse

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 6, 2026

中文版模板 / 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

fix #55916

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English Fix Collapse items semantic structure props not working.
🇨🇳 Chinese 修复 Collapse items 语义化属性无效的问题。

@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 @zombieJ, 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 resolves a bug within the Collapse component where its items were not correctly interpreting semantic properties. The fix is achieved by upgrading the @rc-component/collapse library to version ~1.2.0, which includes the necessary corrections to restore proper functionality.

Highlights

  • Dependency Update: Updated the @rc-component/collapse dependency from ~1.1.2 to ~1.2.0. This update is crucial for resolving an issue where semantic properties for Collapse items were not functioning correctly.

🧠 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

Visual Regression Build for PR # Failed ❌

Potential causes:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Preview is ready

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Summary by CodeRabbit

发布说明

  • Chores
    • 更新了折叠组件库的依赖版本,以获取最新的改进和优化。

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

Walkthrough

更新 @rc-component/collapse 依赖版本从 ~1.1.2 升级至 ~1.2.0,以修复 Collapse Panel 的样式和类名属性无法生效的问题。

Changes

组件 / 文件 变更摘要
依赖版本更新
package.json
@rc-component/collapse 版本从 ~1.1.2 更新为 ~1.2.0

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

小兔跳跃欢欣鼓舞,🐰
collapse 版本轻轻升级,
styles 和 className 重获新生,
Panel 面板焕然一新!✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: Collapse items semantic props' clearly summarizes the main change - updating the collapse component to fix semantic structure properties, which directly aligns with the changeset of updating @rc-component/collapse dependency and the linked issue #55916 about Panel styles and className not working.
Description check ✅ Passed The PR description is related to the changeset and linked issues. It references issue #55916 about Collapse items semantic props not working, includes proper changelog entries, and follows the repository's PR template checklist.
Linked Issues check ✅ Passed The PR addresses issue #55916 by updating @rc-component/collapse to version ~1.2.0, which includes the fix for Panel style and className props not taking effect. The dependency update aligns with the coding objectives to resolve the semantic structure props issue.
Out of Scope Changes check ✅ Passed All changes in the PR are directly related to the linked issue #55916. The single modification updates @rc-component/collapse dependency to include the upstream fix for semantic structure props, with no extraneous changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-collapse

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae9fc64 and 871c625.

📒 Files selected for processing (1)
  • package.json
🧰 Additional context used
🧠 Learnings (2)
📚 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:

  • package.json
📚 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: Support React 18 ~ 19 versions and Chrome 80+ browser compatibility

Applied to files:

  • package.json
⏰ 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). (19)
  • GitHub Check: test lib/es module (es, 2/2)
  • GitHub Check: test lib/es module (lib, 2/2)
  • GitHub Check: test lib/es module (es, 1/2)
  • GitHub Check: test-react-latest (dom, 2/2)
  • GitHub Check: test lib/es module (lib, 1/2)
  • GitHub Check: test-react-legacy (18, 2/2)
  • GitHub Check: test-react-latest (dom, 1/2)
  • GitHub Check: test-react-legacy (18, 1/2)
  • GitHub Check: lint
  • GitHub Check: build
  • GitHub Check: test-node
  • GitHub Check: visual-diff snapshot (1/2)
  • GitHub Check: visual-diff snapshot (2/2)
  • GitHub Check: build preview
  • GitHub Check: size
  • GitHub Check: build
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Cloudflare Pages: ant-design-next
  • GitHub Check: build
🔇 Additional comments (1)
package.json (1)

120-120: 依赖版本升级验证通过。

@rc-component/collapse~1.1.2 升级到 ~1.2.0(2026年1月6日发布)包含了修复 Panel styleclassName 属性的补丁,完全符合 PR 目标。该版本声明支持 React ≥18.0.0,与项目的 React 18-19 支持策略兼容。无安全漏洞。


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.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcli-progress@​3.12.010010010080100
Addedcross-env@​10.1.010010010082100

View full report

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 fixes a bug where semantic props for Collapse items were not working correctly by updating the @rc-component/collapse dependency to version ~1.2.0. The change is straightforward and directly targets the root cause in the dependency. I've added a comment suggesting the addition of a regression test to prevent this issue from recurring in the future.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 6, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

size-limit report 📦

Path Size
dist/antd.min.js 522.91 KB (+106 B 🔺)
dist/antd-with-locales.min.js 616.77 KB (+385 B 🔺)

@cloudflare-workers-and-pages
Copy link

Deploying ant-design-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 871c625
Status: ✅  Deploy successful!
Preview URL: https://6238ffce.ant-design-next.pages.dev
Branch Preview URL: https://fix-collapse.ant-design-next.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 871c625
Status: ✅  Deploy successful!
Preview URL: https://925a0d79.ant-design.pages.dev
Branch Preview URL: https://fix-collapse.ant-design.pages.dev

View logs

@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 (ae9fc64) to head (871c625).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #56517   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          805       805           
  Lines        14844     14844           
  Branches      3920      3920           
=========================================
  Hits         14844     14844           

☔ 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 decrease total bundle size by 8.13MB (-67.79%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.86MB -8.13MB (-67.79%) ⬇️

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.min.js (New) 2.12MB 2.12MB 100.0% 🚀
antd.min.js (New) 1.74MB 1.74MB 100.0% 🚀
antd-with-locales.js (Deleted) -6.3MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -5.69MB 0 bytes -100.0% 🗑️

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 7, 2026
@meet-student meet-student merged commit 1463722 into master Jan 7, 2026
49 of 50 checks passed
@meet-student meet-student deleted the fix-collapse branch January 7, 2026 01:14
@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.

Collapse Panel 的 styles 和 className 不生效

3 participants