Skip to content

chore: standardize repository setup#568

Merged
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config
Jun 29, 2026
Merged

chore: standardize repository setup#568
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

Summary by CodeRabbit

  • 新功能
    • 新增中文 README,并全面改版英文文档:安装、使用示例、本地站点启动与 API 表格更新。
    • 增加自动化流程:PR 预览发布与“React Doctor”质量诊断。
  • Bug 修复
    • 调整文档站点的构建输出目录与基础路径(基于部署环境自动计算),提升访问一致性。
  • Chores
    • 更新 CI 配置、CodeQL/权限/依赖更新策略、脚本与校验流程;新增许可证文件,并调整构建与忽略规则。

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dialog Ready Ready Preview, Comment Jun 29, 2026 6:26am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

本 PR 更新了文档构建与发布路径,调整了多个 GitHub Actions 工作流,重写了英文与中文 README,修复了示例中的 TypeScript 类型封装,并同步升级了工具链、依赖与配置。

Changes

CI、部署与文档现代化

Layer / File(s) 说明
构建与发布路径
.dumirc.ts, vercel.json, .gitignore, .prettierignore, package.json
docs-dist 作为文档输出与发布目标;dumirc.ts 基于 GH_PAGES 计算 base/publicPathvercel.json 追加部署配置;package.json 调整 gh-pages 相关脚本。
工作流与仓库自动化
.github/workflows/codeql.yml, .github/workflows/react-component-ci.yml, .github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .github/dependabot.yml, .github/FUNDING.yml, .husky/pre-commit
CodeQL 动作版本与触发配置更新,测试复用工作流切换目标文件,新增 React Doctor 与 Surge Preview 工作流,Dependabot 改为按周扫描,Funding 配置精简,并新增 pre-commit 的 lint-staged 钩子。
文档与示例
README.md, README.zh-CN.md, docs/examples/draggable.tsx, LICENSE
英文与中文 README 重写,补充安装、使用、API、开发与发布说明;draggable 示例改为类型封装;新增 MIT LICENSE
工具链与依赖
package.json, tsconfig.json
更新主页与仓库地址,批量升级开发依赖,并调整 TypeScript 的编译类型范围与弃用告警设置。

估计代码审查工作量

🎯 3 (Moderate) | ⏱️ ~25 minutes

🐇 我跳过草地看一看,
docs-dist 亮得像月牙。
工作流跑得更整齐,
中英文档都开花。
小兔子拍拍胡须笑:嘿呀!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次对仓库配置、CI、文档与发布流程的整体标准化改动。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

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.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-dialog-preview-pr-568.surge.sh
📝 Commit4b80143
⏱️ Build time13.012s
📦 Size8.9 MB (no change) · 63 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 4b80143 · react-component-dialog-preview-pr-568.surge.sh (open ↗) · 2026-06-29 06:26:12 UTC

🤖 Powered by surge-preview

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.94%. Comparing base (ca56f32) to head (4b80143).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #568   +/-   ##
=======================================
  Coverage   98.94%   98.94%           
=======================================
  Files           8        8           
  Lines         190      190           
  Branches       69       69           
=======================================
  Hits          188      188           
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Copy link
Copy Markdown
Contributor

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 cleans up the repository configuration and documentation. Key changes include updating the funding configurations, completely revamping the README with a modern layout and updated API tables, replacing the old static build configuration with a new vercel.json file, and updating several scripts in package.json (such as switching tsc from bunx to standard tsc and updating Husky/Prettier configurations). Feedback is provided to ensure consistency in the README's API table by using React.CSSProperties instead of CSSProperties.

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.

Comment thread README.md Outdated
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 4b80143.

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​jest@​30.0.0 ⏵ 29.5.14100 +110077 +180100
Addednpm/​glob@​13.0.6961009985100
Addednpm/​@​testing-library/​react@​15.0.710010010087100

View full report

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 @.github/workflows/react-component-ci.yml:
- Around line 5-6: 这处 reusable workflow 调用同时使用了可变引用和全量 secrets 继承,存在把当前仓库所有
secrets 暴露给外部工作流的风险;请在 .github/workflows/react-component-ci.yml 中把对
react-component/rc-test 的 workflow 引用从可变分支改为固定 SHA,并移除 secrets: inherit,改为只显式传递该
workflow 实际需要的最小 secrets 集合。
🪄 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: a4af4be2-df7e-4d16-83fe-957b752c4bb8

📥 Commits

Reviewing files that changed from the base of the PR and between ca56f32 and b1a8541.

📒 Files selected for processing (13)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • README.md
  • README.zh-CN.md
  • docs/examples/draggable.tsx
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (1)
  • now.json

Comment thread .github/workflows/react-component-ci.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
README.zh-CN.md (2)

73-75: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

animationtransitionName 并存,且 className/classNames 语义描述不一致。

  • 第 73 行 animation 与第 95 行 transitionName 功能重叠,请确认是否两者都存在于当前版本 API 中,或 animation 为旧版遗留。
  • 第 74 行 className 描述为"附加对话框 className",而第 75 行 classNames 描述为"语义 className",两者描述风格不一致,建议统一为"附加的对话框 className"和"语义化的 className 配置"。
🤖 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 `@README.zh-CN.md` around lines 73 - 75, The README API table has inconsistent
prop documentation: `animation` and `transitionName` appear to overlap, and
`className`/`classNames` use mismatched wording. Update the documentation around
the Dialog props table so `animation` is either clearly marked as legacy/removed
or aligned with `transitionName` in the same API surface, and standardize the
descriptions in the Dialog prop entries for `className` and `classNames` using
the same semantic style.

91-93: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

scrollLockstyles 描述格式不一致。

  • 第 91 行 scrollLock:"打开时是否锁定body滚动"中"body"未大写,建议改为"锁定 body 滚动"以符合技术术语规范。
  • 第 93 行 styles 描述为"语义化样式",而第 75 行 classNames 描述为"语义 className",两者修饰词不一致("语义化" vs "语义"),建议统一为"语义化的 className 配置"和"语义化的样式配置"。
🤖 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 `@README.zh-CN.md` around lines 91 - 93, In the README.zh-CN prop table,
normalize the wording for `scrollLock` and `styles` so the terminology is
consistent with `classNames`. Update the `scrollLock` description to use “body”
in a standard technical phrasing, and revise the `classNames`/`styles`
descriptions to use the same “语义化的…” style. Make these wording changes in the
relevant table entries only, keeping the existing props and structure intact.
🤖 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 `@README.zh-CN.md`:
- Around line 84-87: The遮罩相关文案在 README.zh-CN.md 中术语不一致且有误译,需要统一修正。请在表格中更新
`mask`、`maskAnimation`、`maskTransitionName` 这几个条目,确保 `mask`
的说明改为“是否显示遮罩”,`maskTransitionName` 的说明改为“遮罩过渡 className”,并检查 `maskAnimation` 与
`maskTransitionName` 是否都是有效 API 或是否存在旧命名需要同步说明。

---

Nitpick comments:
In `@README.zh-CN.md`:
- Around line 73-75: The README API table has inconsistent prop documentation:
`animation` and `transitionName` appear to overlap, and `className`/`classNames`
use mismatched wording. Update the documentation around the Dialog props table
so `animation` is either clearly marked as legacy/removed or aligned with
`transitionName` in the same API surface, and standardize the descriptions in
the Dialog prop entries for `className` and `classNames` using the same semantic
style.
- Around line 91-93: In the README.zh-CN prop table, normalize the wording for
`scrollLock` and `styles` so the terminology is consistent with `classNames`.
Update the `scrollLock` description to use “body” in a standard technical
phrasing, and revise the `classNames`/`styles` descriptions to use the same
“语义化的…” style. Make these wording changes in the relevant table entries only,
keeping the existing props and structure intact.
🪄 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: 4cb05161-62fa-4d87-b87d-1227a118a5a7

📥 Commits

Reviewing files that changed from the base of the PR and between b1a8541 and e84fa61.

📒 Files selected for processing (10)
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json
✅ Files skipped from review due to trivial changes (4)
  • LICENSE
  • .prettierignore
  • .gitignore
  • README.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • package.json

Comment thread README.zh-CN.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.github/workflows/react-component-ci.yml (1)

8-9: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

这里会打破当前 reusable workflow 的 secrets 合约。

react-component/rc-test 先声明 workflow_call.secrets 之前,这里把 secrets: inherit 收紧成只传 CODECOV_TOKEN,会让当前共享工作流调用不再兼容。这个 PR 里更稳妥的做法是先保持 secrets: inherit,等 rc-test 先完成合约升级后再一起收紧调用方。Based on learnings,react-component/rc-test/.github/workflows/test-utoo.yml 目前还没有声明显式的 workflow_call.secrets 合约,调用方在它更新前需要继续使用 secrets: inherit

#!/bin/bash
set -euo pipefail

tmp="$(mktemp)"
trap 'rm -f "$tmp"' EXIT

curl -fsSL \
  https://raw.githubusercontent.com/react-component/rc-test/main/.github/workflows/test-utoo.yml \
  -o "$tmp"

echo "== workflow_call block =="
sed -n '/workflow_call:/,/^[^[:space:]]/p' "$tmp"

echo
echo "== secret references inside reusable workflow =="
rg -n '\bsecrets\.[A-Z0-9_]+\b' "$tmp" || true
🤖 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/react-component-ci.yml around lines 8 - 9, 当前 reusable
workflow 的 secrets 合约还没升级完成,直接把调用方收紧到只传 CODECOV_TOKEN 会破坏兼容性。请在这个工作流里保持 secrets:
inherit,不要改成显式单个 secret 传递;等 react-component/rc-test 的 reusable workflow 先声明好
workflow_call.secrets 合约后,再同步收紧调用方。重点检查当前 workflow 的 secrets 配置和 rc-test 的
test-utoo.yml 调用契约是否一致。

Source: Learnings

🤖 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.

Duplicate comments:
In @.github/workflows/react-component-ci.yml:
- Around line 8-9: 当前 reusable workflow 的 secrets 合约还没升级完成,直接把调用方收紧到只传
CODECOV_TOKEN 会破坏兼容性。请在这个工作流里保持 secrets: inherit,不要改成显式单个 secret 传递;等
react-component/rc-test 的 reusable workflow 先声明好 workflow_call.secrets
合约后,再同步收紧调用方。重点检查当前 workflow 的 secrets 配置和 rc-test 的 test-utoo.yml 调用契约是否一致。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 453a7892-b0a4-4383-b103-97c71e6e2a94

📥 Commits

Reviewing files that changed from the base of the PR and between 6e67efb and 4b80143.

📒 Files selected for processing (1)
  • .github/workflows/react-component-ci.yml

@afc163 afc163 merged commit 70b7167 into master Jun 29, 2026
15 checks passed
@afc163 afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:01
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.

1 participant