Skip to content

chore: standardize repository config#523

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

chore: standardize repository config#523
afc163 wants to merge 20 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Redesign README with npm/bundlephobia badges, Ant Design brand context, installation, usage, API, development, and release sections.
  • Standardize repository config: package scripts, dumi/father/tsconfig, FUNDING, Dependabot, Vercel preview, Surge preview fallback, React Doctor, and CodeQL workflow.
  • Update docs demos to use the scoped package import style and keep tooltip asset imports resolvable in docs preview.

Test plan

  • npm run tsc
  • npm test -- --runInBand
  • npm run lint
  • npm run build
  • npx vercel build --yes

Refs ant-design/ant-design#58514

Summary by CodeRabbit

  • 新功能
    • 新增 CodeQL 安全检查与“React Doctor”质量检查;新增 PR 文档预览能力。
  • 文档
    • 重写英文 README,并新增中文文档与更清晰的 API/示例组织。
  • 修复
    • 修正文档站点在不同发布场景下的访问路径与跳转。
  • 变更
    • 组件导入统一为 @rc-component/tooltip,更新包入口与发布清单。

@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)
tooltip Ready Ready Preview, Comment Jun 28, 2026 6:03am

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 608f6922-f6db-4194-a637-62d984e77fd3

📥 Commits

Reviewing files that changed from the base of the PR and between 7851d84 and 82eee44.

📒 Files selected for processing (2)
  • .github/workflows/surge-preview.yml
  • .prettierignore
✅ Files skipped from review due to trivial changes (1)
  • .prettierignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/surge-preview.yml

Walkthrough

将仓库统一切换到 @rc-component/tooltip 命名,更新构建、站点、CI 配置与示例导入,并重写英文 README、补充中文文档。

Changes

包重命名与工程基础设施更新

Layer / File(s) Summary
包配置与站点输出
package.json, tsconfig.json, .dumirc.ts, vercel.json, .gitignore, .prettierignore
更新包元数据、入口与脚本,调整 TypeScript 路径别名和编译范围,切换 dumi 站点 base/publicPath 与输出目录,并整理忽略规则。
CI 工作流与依赖配置
.github/workflows/*, .github/dependabot.yml, .github/FUNDING.yml
更新现有 CI 触发条件与下游引用,新增 CodeQL、React Doctor 和 Surge Preview 工作流,删除旧站点部署工作流,并收窄资助与依赖更新配置。
示例导入路径更新
docs/examples/*.tsx, docs/index.md
将示例中的 Tooltip/Popup 导入切换到 @rc-component/tooltip 相关入口,并同步更新文档首页标题。
README 重写与中文文档
README.md, README.zh-CN.md
重写英文 README,新增中文 README,并补充安装、使用、API、开发、发布与许可证内容。

预估代码审查工作量

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested Reviewers

  • zombieJ

Poem

🐇 旧名换新装,
站点跑得亮堂堂,
示例文档都归位,
中英 README 一起上,
小兔跳跳庆更新~

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ 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-tooltip-preview-pr-523.surge.sh
📝 Commit82eee44
⏱️ Build time26.711s
📦 Size1.7 MB (no change) · 58 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 82eee44 · react-component-tooltip-preview-pr-523.surge.sh (open ↗) · 2026-06-28 09:20:59 UTC

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

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@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 project configuration, documentation, and examples to migrate from the legacy rc-tooltip package name to the scoped @rc-component/tooltip package. Key changes include updating aliases in .dumirc.ts and tsconfig.json, revising the README.md and examples, adding new build and deployment scripts in package.json, and configuring Vercel deployment. Feedback on these changes suggests removing redundant wildcard alias keys in .dumirc.ts and simplifying the gh-pages script in package.json to avoid duplicating build steps.

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 .dumirc.ts Outdated
Comment thread package.json Outdated
@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 100.00%. Comparing base (b537679) to head (82eee44).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #523   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           36        36           
  Branches        14        14           
=========================================
  Hits            36        36           

☔ 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/react-component?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/afc163s-projects?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
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: 5

🤖 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: Update the reusable workflow call in the CI configuration
to stop using the mutable `@main` reference and replace it with a pinned commit
SHA, and narrow secret propagation by removing secrets: inherit. In the workflow
invocation for react-component/rc-test/.github/workflows/test-utoo.yml,
explicitly pass only the CODECOV_TOKEN secret so the called workflow receives
just the required credential.

In @.github/workflows/surge-preview.yml:
- Around line 26-41: The Surge preview workflow is reading secrets directly in
step-level if conditions, which GitHub Actions rejects. Update the job setup so
SURGE_TOKEN is exposed once via job-level env, then change the affected step
conditions in surge-preview.yml to use env.SURGE_TOKEN instead of
secrets.SURGE_TOKEN; keep the afc163/surge-preview step and the Skip Surge
preview step aligned with that env-based check.

In `@README.md`:
- Line 67: Update the documentation text for TriggerProps['builtinPlacements']
so the description uses the hyphenated form “built-in placements” instead of
“built in placements”; adjust the README table entry in the builtinPlacements
row to keep the terminology grammatically correct and consistent.

In `@README.zh-CN.md`:
- Line 73: The Chinese README has several mistranslations in the prop table that
should be corrected for accuracy and consistency. Update the descriptions for
getTooltipContainer, mouseEnterDelay, mouseLeaveDelay, placement, and
prefixClassName in README.zh-CN.md to use the intended meanings (“获取/指定弹层容器”,
“鼠标移入”, “鼠标移出后隐藏的延迟(秒)”, “弹层放置”, and “前缀 className/类名”); use the prop names
themselves to locate the affected entries.
- Line 67: The English phrase in the README table is missing the hyphen in
“built in.” Update the description text for builtinPlacements to use “built-in
placements” so it matches the English README and keeps terminology 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: 7eecf2b2-3967-4bcd-81d2-5a27fd2856ca

📥 Commits

Reviewing files that changed from the base of the PR and between b537679 and 36996c6.

📒 Files selected for processing (23)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/site-deploy.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • README.zh-CN.md
  • docs/examples/arrowContent.tsx
  • docs/examples/formError.tsx
  • docs/examples/onVisibleChange.tsx
  • docs/examples/placement.tsx
  • docs/examples/point.tsx
  • docs/examples/showArrow.tsx
  • docs/examples/simple.tsx
  • docs/examples/twoButtons.tsx
  • docs/index.md
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (1)
  • .github/workflows/site-deploy.yml

Comment thread .github/workflows/react-component-ci.yml
Comment thread .github/workflows/surge-preview.yml Outdated
Comment thread README.md Outdated
Comment thread README.zh-CN.md Outdated
Comment thread README.zh-CN.md Outdated
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.

2 participants