Skip to content

chore: standardize repository config#994

Open
afc163 wants to merge 27 commits into
masterfrom
codex/standardize-rc-config
Open

chore: standardize repository config#994
afc163 wants to merge 27 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)
tabs Ready Ready Preview, Comment Jun 28, 2026 4:36am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

仓库更新了包配置、文档站、GitHub Actions、示例导入、测试断言和中英文文档内容,并同步调整了发布与预览相关配置。

Changes

@rc-component/tabs 配置、文档与工作流更新

Layer / File(s) Summary
包配置与 TypeScript 路径别名
package.json, tsconfig.json
package.json 更新发布元数据、脚本、依赖和入口字段;tsconfig.json 调整 @rc-component/tabs 及其子路径映射,并收敛编译包含与排除范围。
文档站构建配置(Dumi / Vercel)
.dumirc.ts, vercel.json, .gitignore
.dumirc.ts 增加基于 GH_PAGESbase/publicPathaliasoutputPathvercel.json 新增构建配置;.gitignore 更新文档构建产物与本地环境忽略规则。
CI 工作流新增与替换
.github/workflows/*, .github/dependabot.yml, .github/FUNDING.yml
新增测试、CodeQL、React Doctor 和 Surge Preview 工作流,简化 Dependabot 与 FUNDING 配置。
示例与可访问性测试更新
docs/examples/*.tsx, tests/accessibility.test.tsx
示例中的 Tabs/TabsProps 导入统一切换为 @rc-component/tabsdynamic-extra.tsx 调整局部 JSX 写法,tests/accessibility.test.tsx 更新鼠标与键盘导航断言。
README 与文档页更新
README.md, README.zh-CN.md, docs/index.md, LICENSE
英文与中文 README 被重写为 @rc-component/tabs 文档内容,docs/index.md 标题同步更新,并补充仓库许可证文本。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • zombieJ

Poem

🐰 兔耳轻摇新门牌,
文档站点亮起来。
CI 小灯一排排,
示例换装不徘徊。
Tabs 跳进新旅程,
春风一吹,哒哒来 ✨

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

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-tabs-preview-pr-994.surge.sh (may be unavailable)
📝 Commit57fc51b
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-tabs-preview-pr-994.surge.sh
           size: 67 files, 1.8 MB

   Aborted - you do not have permission to publish to react-component-tabs-preview-pr-994.surge.sh

🤖 Powered by surge-preview

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 57fc51b.

@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 updates the repository configuration, documentation, and build scripts to support Dumi-based documentation, Vercel deployments, and cleaner package distribution. Key changes include rewriting the README, updating example imports, configuring path aliases in .dumirc.ts and tsconfig.json, and adjusting package.json scripts. Feedback on these changes suggests packaging the entire assets directory to preserve .less files for consumers, restoring linting and type-checking in the prepublishOnly script, and optimizing the Vercel build command to only build the documentation.

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 package.json
Comment thread package.json
Comment thread vercel.json
@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.98%. Comparing base (8c7ea8d) to head (57fc51b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #994   +/-   ##
=======================================
  Coverage   98.98%   98.98%           
=======================================
  Files          18       18           
  Lines         788      788           
  Branches      235      235           
=======================================
  Hits          780      780           
  Misses          8        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.

@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

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

🤖 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 11-12: The reusable workflow invocation should stop tracking the
moving main branch and avoid inheriting all secrets. Update the workflow call in
the CI config to reference a fixed commit SHA for the test-utoo.yml reusable
workflow, and replace secrets: inherit with an explicit minimal secrets mapping
containing only the symbols that the reusable workflow actually needs.

In @.github/workflows/surge-preview.yml:
- Around line 19-42: The workflow’s step conditions are referencing secrets
directly in `if:` clauses, which actionlint rejects during parsing. Update the
preview job in the Surge preview workflow to gate the “Build preview”,
`afc163/surge-preview`, and “Skip Surge preview” steps using an
environment-based flag derived from `SURGE_TOKEN` instead of checking `secrets`
inline, so the step selection works reliably at runtime.

In `@package.json`:
- Around line 85-87: Update the package.json engines.node constraint to reflect
the real minimum supported Node version rather than >=8.x. Adjust the value in
the engines block to match the highest required runtime from the current build
dependencies, and keep the change localized to the engines field so installers
and tooling get an accurate compatibility signal.

In `@README.zh-CN.md`:
- Line 57: Update the Chinese README wording around the `classNames`-related
table entries so the labels read naturally and consistently: fix the spacing in
terms like “附加 className” and “前缀 className”, correct the typo “面板className称” to
“面板 className” or “面板类名”, and use the existing `classNames` section in
README.zh-CN.md as the target. Also translate the remaining English descriptions
in that table into Chinese so the documentation stays fully localized and
consistent.
🪄 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: 5009336d-da30-48c3-a055-e3700bb40f0b

📥 Commits

Reviewing files that changed from the base of the PR and between 8c7ea8d and c5c61c1.

📒 Files selected for processing (26)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/dependabot.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
  • docs/examples/animated.tsx
  • docs/examples/basic.tsx
  • docs/examples/dynamic-extra.tsx
  • docs/examples/editable.tsx
  • docs/examples/extra.tsx
  • docs/examples/indicator.tsx
  • docs/examples/mix.tsx
  • docs/examples/overflow.tsx
  • docs/examples/position.tsx
  • docs/examples/renderTabBar-dragable.tsx
  • docs/examples/renderTabBar-sticky.tsx
  • docs/index.md
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (1)
  • .github/workflows/main.yml

Comment thread .github/workflows/react-component-ci.yml
Comment thread .github/workflows/surge-preview.yml
Comment thread package.json
Comment thread README.zh-CN.md Outdated
@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/​cross-env@​10.1.010010010082100
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: 2

🧹 Nitpick comments (1)
tsconfig.json (1)

21-31: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

补上 @rc-component/tabs/assets 的精确路径映射。
.dumirc.ts 已经声明了 @rc-component/tabs/assets,但 tsconfig.json 只配了 @rc-component/tabs/assets/*,裸导入时会在 dumi 和 tsc 之间出现解析差异。

💡 建议修改
       "`@rc-component/tabs/es/`*": [
         "src/*"
       ],
+      "`@rc-component/tabs/assets`": [
+        "assets"
+      ],
       "`@rc-component/tabs/assets/`*": [
         "assets/*"
       ]
🤖 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 21 - 31, The path mapping in tsconfig is missing
the exact `@rc-component/tabs/assets` entry, causing bare imports to resolve
differently between dumi and tsc. Update the tsconfig paths alongside the
existing `@rc-component/tabs/assets/`* mapping so that `@rc-component/tabs/assets`
resolves directly to the assets directory, matching the alias already declared
in .dumirc.ts and keeping resolution consistent.
🤖 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 `@tests/accessibility.test.tsx`:
- Around line 146-149: The tab focus test is using low-level mouse events
instead of the real user interaction path, so it may miss focus-related
regressions. Update the accessibility test around secondTab to use the
user-event API (for example through user.click or pointer interactions) and
assert the expected focus state with toHaveFocus alongside the rc-tabs-tab-focus
check. Keep the intent of the existing assertion, but make the test reflect
actual browser focus behavior.

In `@tsconfig.json`:
- Around line 36-40: The tsconfig include list is missing the root .fatherrc.ts,
so type and import issues in that config file are not caught during type
checking. Update the include array in tsconfig.json to add .fatherrc.ts
alongside .dumirc.ts, keeping the existing src, tests, and docs/examples entries
unchanged.

---

Nitpick comments:
In `@tsconfig.json`:
- Around line 21-31: The path mapping in tsconfig is missing the exact
`@rc-component/tabs/assets` entry, causing bare imports to resolve differently
between dumi and tsc. Update the tsconfig paths alongside the existing
`@rc-component/tabs/assets/`* mapping so that `@rc-component/tabs/assets` resolves
directly to the assets directory, matching the alias already declared in
.dumirc.ts and keeping resolution consistent.
🪄 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: 0301e8d5-8519-42e1-89e6-5c2f05424d4e

📥 Commits

Reviewing files that changed from the base of the PR and between c5c61c1 and 8f2283d.

📒 Files selected for processing (6)
  • .dumirc.ts
  • README.md
  • README.zh-CN.md
  • package.json
  • tests/accessibility.test.tsx
  • tsconfig.json
✅ Files skipped from review due to trivial changes (2)
  • README.zh-CN.md
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .dumirc.ts

Comment thread tests/accessibility.test.tsx
Comment thread tsconfig.json
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