Skip to content

chore: standardize repository maintenance#393

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

chore: standardize repository maintenance#393
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.

@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)
notification Ready Ready Preview, Comment Jun 29, 2026 6:31am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-notification-preview-pr-393.surge.sh
📝 Commit51ed931
⏱️ Build time18.995s
📦 Size1.6 MB (no change) · 46 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 51ed931 · react-component-notification-preview-pr-393.surge.sh (open ↗) · 2026-06-29 06:29:18 UTC

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb0345c0-2c36-4270-b0e7-ae89dcf0d681

📥 Commits

Reviewing files that changed from the base of the PR and between 2bfdf7a and 51ed931.

📒 Files selected for processing (11)
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .husky/pre-commit
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json

Walkthrough

本 PR 更新了文档构建与部署配置、GitHub Actions 工作流、README 中英文文档,以及测试中与 content 样式相关的断言和用例。

Changes

文档、CI、说明与测试

Layer / File(s) Summary
构建与部署配置
.dumirc.ts, package.json, tsconfig.json, .gitignore, vercel.json, .github/FUNDING.yml
.dumirc.ts 增加 GH Pages 子路径相关配置;package.json 更新构建/发布脚本与依赖版本;tsconfig.json 调整路径别名、include/exclude 与编译选项;.gitignorevercel.json.github/FUNDING.yml 更新部署与项目配置。
工作流更新
.github/workflows/codeql.yml, .github/workflows/react-component-ci.yml, .github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml
codeql.yml 更新触发器与固定 action 引用;新增复用测试、React Doctor 和 Surge 预览工作流。
README 中英文重写
README.md, README.zh-CN.md
两份 README 改写为 useNotification / NotificationProvider 文档,更新安装、示例、API、类型、开发与发布内容。
测试断言与用例
tests/index.test.tsx
新增 expectContentStyle 辅助函数,更新多处 content 样式断言,并新增 closable: false 用例。

可能相关的 PR

估算的代码审查工作量

🎯 3 (Moderate) | ⏱️ ~25 minutes

🐇 兔子敲键盘,文档换新颜,
GH Pages 小路通,预览跑得欢。
Hook 代替旧实例,测试断言也更严,
我把胡萝卜点点头:这次改动真齐全。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题概括了本次以仓库维护、文档和工具链标准化为主的改动。
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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.

@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 99.20%. Comparing base (9e08c02) to head (51ed931).

Additional details and impacted files
@@           Coverage Diff            @@
##           master     #393    +/-   ##
========================================
  Coverage   99.20%   99.20%            
========================================
  Files          13       12     -1     
  Lines        1375      377   -998     
  Branches      182      102    -80     
========================================
- Hits         1364      374   -990     
+ Misses         11        3     -8     

☔ 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

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 modernizes the repository configuration and documentation. Key changes include updating the README to document the hook-based useNotification API, updating build and deployment scripts in package.json to target docs-dist, configuring Vercel deployment via vercel.json, and refining TypeScript path mappings. Feedback highlights two improvement opportunities: removing the manual Date.now() key in the README example since the hook automatically handles unique key generation, and using cross-env in the gh-pages npm script to ensure cross-platform compatibility.

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
Comment thread package.json 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/afc163s-projects?upgradeToPro=build-rate-limit

@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

@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/​vitest@​0.34.6 ⏵ 4.1.998 +1100 +7579 +198100
Updatednpm/​@​vitest/​coverage-v8@​0.34.6 ⏵ 4.1.999 +110079 +1298100
Updatednpm/​@​types/​node@​24.13.2 ⏵ 26.0.11001008196100
Updatednpm/​jsdom@​24.1.3 ⏵ 29.1.181 -13100100 +192100 +31

View full report

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @emnapi/runtime is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/vitest@4.1.9npm/@emnapi/runtime@1.11.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm data-urls is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/jsdom@29.1.1npm/data-urls@7.0.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/data-urls@7.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.jsonnpm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.jsonnpm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@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 51ed931.

@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: 5

🧹 Nitpick comments (1)
tests/index.test.tsx (1)

44-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

先断言节点存在,再读取 style.content

这里直接把 querySelector 结果断言成 HTMLElement。一旦节点没渲染出来,测试会先抛 TypeError,失败信息里看不到具体 selector,后面这些样式用例会更难排查。

♻️ 建议修改
 function expectContentStyle(selector: string, content: string) {
-  expect((document.querySelector(selector) as HTMLElement).style.content).toBe(`"${content}"`);
+  const element = document.querySelector(selector);
+  expect(element, `Missing element for selector: ${selector}`).not.toBeNull();
+  expect((element as HTMLElement).style.content).toBe(`"${content}"`);
 }
🤖 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 `@tests/index.test.tsx` around lines 44 - 46, The helper expectContentStyle
currently assumes querySelector always returns an element, so missing nodes will
fail with a TypeError before the assertion is useful. Update expectContentStyle
to first assert that the selector resolves to a real DOM node, then read its
style.content, so failures clearly identify the missing selector and keep the
style checks in tests/index.test.tsx easy to debug.
🤖 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 6-8: The reusable workflow call in this CI config is too loose: it
references the external workflow with a moving branch and inherits all secrets.
Update the job that uses react-component/rc-test/.github/workflows/test-utoo.yml
to pin the reference to an immutable commit SHA instead of `@main`, and replace
secrets: inherit with an explicit secrets mapping containing only the values
that workflow actually needs.

In `@README.zh-CN.md`:
- Around line 114-168: This README.zh-CN notification props table has a few
untranslated or inconsistently translated descriptions. Update the
Notification-related tables so the remaining English descriptions in the
components, icon, and placement entries are translated to consistent Chinese,
and adjust the prefixCls description in the Notification API section to use the
more natural “类名前缀”; use the existing symbols NotificationAPI and
NotificationListConfig to locate the affected rows.
- Around line 114-133: API 表格中的参数名不要翻译,直接把 README.zh-CN.md
里被误写成中文的条目改回与代码一致的名称,重点检查 Notification 相关表格中的 motion 和
style,以及所有同类参数名,避免用户复制后出错;同时在对应描述里把
className称、className前缀等术语统一修正为“类名”“类名前缀”,以保证文档术语与代码符号一致。

In `@tsconfig.json`:
- Around line 29-35: The TypeScript include list currently covers config files
like vitest.config.ts and vitest-setup.ts but misses the tests/ directory, so
test files are not checked by tsc. Update the include entries in tsconfig.json
to add tests alongside the existing src and docs paths, keeping the change near
the current include array so files like tests/index.test.tsx are picked up by
the tsc --noEmit flow.

In `@vercel.json`:
- Around line 1-6: The Vercel build configuration is using the wrong script for
the docs site: update the buildCommand in vercel.json from the generic build
task to the docs-specific script so the output matches docs-dist/. Use the
existing package.json docs:build script (dumi build) rather than npm run build,
and keep the outputDirectory aligned with the generated docs artifact.

---

Nitpick comments:
In `@tests/index.test.tsx`:
- Around line 44-46: The helper expectContentStyle currently assumes
querySelector always returns an element, so missing nodes will fail with a
TypeError before the assertion is useful. Update expectContentStyle to first
assert that the selector resolves to a real DOM node, then read its
style.content, so failures clearly identify the missing selector and keep the
style checks in tests/index.test.tsx easy to debug.
🪄 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: 5e38169e-4796-4f4e-be9d-1d1bb22d391b

📥 Commits

Reviewing files that changed from the base of the PR and between 9e08c02 and 7d489ed.

📒 Files selected for processing (15)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • README.zh-CN.md
  • now.json
  • package.json
  • tests/index.test.tsx
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (2)
  • .github/workflows/main.yml
  • now.json

Comment thread .github/workflows/react-component-ci.yml Outdated
Comment thread README.zh-CN.md Outdated
Comment thread README.zh-CN.md Outdated
Comment thread tsconfig.json
Comment thread vercel.json
@afc163 afc163 merged commit e3c9357 into master Jun 29, 2026
13 checks passed
@afc163 afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:02
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