Skip to content

refactor: use shared value and renderability guards - #1511

Merged
yoyo837 merged 1 commit into
react-component:masterfrom
QDyanbing:refactor-renderable-guards
Sep 3, 2026
Merged

refactor: use shared value and renderability guards#1511
yoyo837 merged 1 commit into
react-component:masterfrom
QDyanbing:refactor-renderable-guards

Conversation

@QDyanbing

@QDyanbing QDyanbing commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

说明

  • 使用 isNonNullable 替换 cell、滚动配置和 caption 的本地非空判断
  • 使用 isReactRenderable 判断 summary 是否需要渲染
  • 移除重复的 validateValue helper,并将 @rc-component/util 最低版本提升到 ^1.13.0

验证

  • npm run tsc
  • npm run lint
  • npm test -- tests/Summary.spec.tsx

Summary by CodeRabbit

  • 改进
    • 优化表格单元格、表头、标题及汇总内容的非空值与可渲染内容判断,提升边界场景下的渲染稳定性。
    • 更新底层工具依赖版本,增强相关功能的兼容性与一致性。

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

@QDyanbing is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 45ef97b2-ca52-4051-a64a-55ecba600705

📥 Commits

Reviewing files that changed from the base of the PR and between 7977f2b and 0cd6bef.

📒 Files selected for processing (4)
  • package.json
  • src/Cell/useCellRender.ts
  • src/Table.tsx
  • src/utils/valueUtil.tsx
💤 Files with no reviewable changes (1)
  • src/utils/valueUtil.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

Changes

值判断工具迁移

Layer / File(s) Summary
迁移到共享判断工具
package.json, src/Cell/useCellRender.ts, src/Table.tsx, src/utils/valueUtil.tsx
@rc-component/util 升级到 ^1.13.0Table 和单元格渲染逻辑改用 isNonNullableisReactRenderable,并移除本地 validateValue

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0cd6b

This updates table cell, scroll, caption, and summary rendering guards to shared utilities and raises the utility dependency minimum version. The supplied validation indicates the intended rendering behavior is preserved, with no current merge-blocking risk identified.

Suggested reviewers: zombiej, afc163

Poem

小兔更新工具包,
可空判断更清楚。
单元格里轻轻跳,
表格渲染不迷路。
旧的校验挥挥手,
新版依赖稳步住。

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 … 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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (7977f2b) to head (0cd6bef).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1511      +/-   ##
==========================================
- Coverage   99.08%   99.08%   -0.01%     
==========================================
  Files          45       45              
  Lines        1428     1426       -2     
  Branches      433      432       -1     
==========================================
- Hits         1415     1413       -2     
  Misses         13       13              

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

@yoyo837 yoyo837 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the renderability semantics, helper selection, dependency floor, existing feedback, and completed CI results. The implementation looks correct. The Vercel failure is limited to team deployment authorization and is not a code or build failure.

@yoyo837
yoyo837 merged commit 9d0fbdd into react-component:master Sep 3, 2026
9 of 10 checks passed
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