Skip to content

refactor: use renderable guard for marks - #1094

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

refactor: use renderable guard for marks#1094
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

说明

  • 使用 isReactRenderable 统一判断 mark label 是否需要渲染
  • 保留现有空内容边界,并支持数字 0NaN 等有效 React 内容
  • @rc-component/util 的最低版本提升到首次提供该 helper 的 ^1.13.0

验证

  • npm run tsc
  • npm test -- --runInBand
  • git diff --check

关联 ant-design/ant-design#59193

Summary by CodeRabbit

  • Bug 修复
    • 修复滑块刻度标记的显示判断,支持更多可渲染内容作为标记标签。
  • 依赖更新
    • 更新相关工具库版本,提升兼容性与稳定性。

@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: 534bc1c8-da54-418f-9380-1675365adb29

📥 Commits

Reviewing files that changed from the base of the PR and between 02260ea and 54113f7.

📒 Files selected for processing (2)
  • package.json
  • src/Slider.tsx

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


Walkthrough

Changes

Mark label 过滤

Layer / File(s) Summary
更新 mark label 过滤逻辑
package.json, src/Slider.tsx
@rc-component/util 更新至 ^1.13.0Slider 使用 isReactRenderable(label) 替换原有过滤条件。

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

Merge Risk: ⚪ Minimal · up to 54113

Slider mark labels now use React-renderability checks, preserving valid numeric content such as 0 and NaN while retaining empty-content handling. The dependency requirement is updated for the helper, and no current merge-blocking risk is identified.

Suggested reviewers: afc163, madccc

Poem

小兔捧着新工具,
滑块刻度排成行。
可渲染的标签留下,
旧的判断轻轻藏。
依赖升级步子稳。

🚥 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 标题“refactor: use renderable guard for marks”准确概括了主要变更,即使用可渲染内容判断逻辑筛选 mark 标签。标题简洁且具体。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

✨ 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 98.66%. Comparing base (02260ea) to head (54113f7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1094   +/-   ##
=======================================
  Coverage   98.66%   98.66%           
=======================================
  Files          15       15           
  Lines         751      751           
  Branches      224      233    +9     
=======================================
  Hits          741      741           
  Misses         10       10           

☔ 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 merged commit 0a05f30 into react-component:master Sep 3, 2026
11 of 12 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