chore: standardize repository setup#247
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough本 PR 调整了 Dropdown 子节点与动画类型处理,迁移文档构建与部署配置,更新 CI/预览工作流和仓库脚本依赖,并重写英文 README、新增中文 README。 ChangesDropdown 组件核心变更
构建、部署与 CI 基础设施
文档更新
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
==========================================
+ Coverage 99.09% 99.10% +0.01%
==========================================
Files 5 5
Lines 110 112 +2
Branches 34 34
==========================================
+ Hits 109 111 +2
Misses 1 1 ☔ 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 updates the project's documentation, funding configuration, and deployment settings (replacing the old configuration with vercel.json), while also adding new scripts to package.json. In the codebase, the animation prop type in Dropdown.tsx was simplified, and the component was refactored to wrap children that do not support refs in a span element. The review feedback highlights a critical issue in this refactoring: if the child is null, undefined, or a primitive value, accessing child.props directly will cause a runtime TypeError. It is recommended to safely check the child using React.isValidElement before accessing its properties.
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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
tsconfig.json (1)
18-23: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win把
.dumirc.ts也纳入tsc覆盖范围。这次 PR 同时改了
.dumirc.ts,但include这里只新增了.fatherrc.ts。如果新增的类型检查脚本是为了覆盖工具链配置,Dumi 配置回归这里仍然不会被tsc提前拦住。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tsconfig.json` around lines 18 - 23, The tsconfig include list is missing the new Dumi config file, so TypeScript coverage won’t catch regressions in that config. Update the existing include array in tsconfig.json to add .dumirc.ts alongside .fatherrc.ts, keeping the same pattern used for the other root-level config files so tsc checks both toolchain configs..github/workflows/surge-preview.yml (1)
35-39: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win为预览构建补上显式 Node 版本。
这里没有actions/setup-node,仓库也没有.nvmrc/.node-version/.tool-versions/engines/packageManager这类版本来源,npm install/npm run build会直接跟随 runner 默认 Node。建议先明确一个版本,再在构建前固定它。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/surge-preview.yml around lines 35 - 39, The preview build job is relying on the runner’s default Node version because there is no explicit version source before the Build preview step. Add a dedicated Node setup step using actions/setup-node in this workflow, choose a fixed version for the build, and make sure the Build preview run block comes after that setup so npm install and npm run build execute under the intended Node runtime.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.dumirc.ts:
- Around line 13-15: The docs build output has been moved to docs-dist, but the
ignore rules still only cover the old .docs directory. Update the existing
.gitignore entry so the new outputPath used in .dumirc.ts is ignored as well,
keeping the generated docs artifacts from showing up as untracked files; make
sure the ignore list matches the current docs build target and its related
output directory naming.
In @.github/workflows/ci.yml:
- Around line 6-8: In the CI workflow job that calls the reusable
`react-component/rc-test` workflow, remove the blanket `secrets: inherit` and
switch to explicitly passing only the required secret inputs for that `uses`
job. Also add a minimal `permissions` block for the `CI` job so the reusable
workflow runs with the least privilege needed, using the existing `CI` job
definition as the place to tighten the configuration.
In `@README.md`:
- Around line 72-89: The README API table is out of sync with the actual
Dropdown typings and implementation. Update the documented props to match
`DropdownProps` in `src/Dropdown.tsx` and the related `TriggerProps` usage: fix
`onOverlayClick` to use the same event type as the callback implementation,
remove or document `defaultVisible` only if it is truly supported, and add the
missing `arrow` prop with its default value. Keep the table aligned with the
symbols `DropdownProps`, `onOverlayClick`, and `arrow` so the docs reflect the
real API.
In `@README.zh-CN.md`:
- Line 31: The README.zh-CN bullet is still in English, so update the translated
copy to keep the Chinese context consistent; change the “Built on
`@rc-component/trigger`” item in the README.zh-CN content to a Chinese phrasing
while preserving the package name, and verify the surrounding bullets in the
same section remain uniformly localized.
- Around line 72-89: API 表格中的多个属性名和说明翻译错误,需要统一修正为与英文文档一致:将“动画片”“扳机”“可见的”分别改回对应的
animation、trigger、visible,并把 openClassName、overlay、transitionName
等项里的“className称”改为“类名”或直接保留 className。同步检查 overlay、placement、getPopupContainer
等说明是否完整中文化,并在 README.zh-CN.md 中按英文 README 的定义修正 defaultVisible 和 onOverlayClick
的描述与类型展示。
In `@src/Dropdown.tsx`:
- Around line 150-160: The fallback branch in Dropdown’s children rendering is
attaching `childClassName` only to the wrapping `<span>`, so components that
don’t support `ref` but do consume `className` never receive the merged
open-state class. Update `childrenNode` in `Dropdown.tsx` so the `child` itself
gets the combined `className`/`openClassName` behavior in the
non-`supportRef(elementChild)` path, while keeping the wrapper only for ref
handling; use the existing `childClassName`, `triggerChildProps`, and
`supportRef` logic to preserve prior trigger styling.
---
Nitpick comments:
In @.github/workflows/surge-preview.yml:
- Around line 35-39: The preview build job is relying on the runner’s default
Node version because there is no explicit version source before the Build
preview step. Add a dedicated Node setup step using actions/setup-node in this
workflow, choose a fixed version for the build, and make sure the Build preview
run block comes after that setup so npm install and npm run build execute under
the intended Node runtime.
In `@tsconfig.json`:
- Around line 18-23: The tsconfig include list is missing the new Dumi config
file, so TypeScript coverage won’t catch regressions in that config. Update the
existing include array in tsconfig.json to add .dumirc.ts alongside
.fatherrc.ts, keeping the same pattern used for the other root-level config
files so tsc checks both toolchain configs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1564453b-e825-4e8e-92e8-cb6c5bc3bd5b
📒 Files selected for processing (13)
.dumirc.ts.github/FUNDING.yml.github/workflows/ci.yml.github/workflows/codeql.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.ymlREADME.mdREADME.zh-CN.mdnow.jsonpackage.jsonsrc/Dropdown.tsxtsconfig.jsonvercel.json
💤 Files with no reviewable changes (1)
- now.json

Summary
Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.
Tracking issue: ant-design/ant-design#58514
Scope
types: "./es/index.d.ts", publishConfig, and release flow through@rc-component/np.react-component/rc-test/.github/workflows/test-utoo.yml@mainworkflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.docs-distoutput and remove legacynow-build/ Cloudflare Pages residue.Notes
secrets: inheritis kept untilreact-component/rc-test#176is merged, then it can be narrowed to explicitCODECOV_TOKENforwarding.Summary by CodeRabbit
New Features
Bug Fixes
ref时的处理,确保打开状态样式正常应用。