feat: support body and content semantic DOM#993
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughTabs 现在引入了 ChangesTab body/content 结构调整
Sequence Diagram(s)sequenceDiagram
participant Tabs
participant TabPanelList
participant CSSMotion
participant TabPane
Tabs->>TabPanelList: pass bodyStyle, bodyClassName, styles.body, tabsClassNames.body
TabPanelList->>CSSMotion: render panel body with contentPrefixCls
CSSMotion->>TabPane: render content and hidden class with contentPrefixCls
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #993 +/- ##
=======================================
Coverage 98.98% 98.98%
=======================================
Files 18 18
Lines 787 788 +1
Branches 232 235 +3
=======================================
+ Hits 779 780 +1
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the internal structure of the Tabs component by renaming the main container elements and introducing new bodyStyle and bodyClassName props. Specifically, the class names have been updated to use -body for the main body wrapper and -content for the individual tab panes. A review comment identifies a potential runtime error in TabPanelList where the optional animated prop is accessed without a fallback, suggesting a default value during destructuring.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request refactors the Tabs component by renaming content-related classes to body-related classes (e.g., rc-tabs-content to rc-tabs-body and rc-tabs-tabpane to rc-tabs-content) and introducing bodyStyle and bodyClassName props. The review feedback points out a potential issue where an optional tabPosition prop could result in an invalid class name like rc-tabs-body-undefined if not guarded.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request refactors the tab component's structure by renaming the content wrapper to body and the individual tab panes to content. It also introduces new bodyStyle and bodyClassName properties to allow custom styling of the body element, and updates the corresponding LESS styles, TypeScript definitions, and tests to reflect these changes. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
bodysemantic className/style on the panel body wrappercontentsemantic className/style on the actualtabpanelClose #991
Test
ut run testut run lintut run compile:styleSummary by CodeRabbit
新功能
改进
测试