feat: support show exact value - #218
Conversation
|
@dogledogle is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughRate 新增 ChangesRate 精确评分展示
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change adds exact-value display support for disabled ratings; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Rate
participant Star
participant RatingMarkup
Rate->>Star: disabled && showExactValue
Star->>RatingMarkup: 根据小数比例设置宽度
RatingMarkup-->>Star: 渲染精确评分
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
nrps9909
left a comment
There was a problem hiding this comment.
Approved exact head ba5e1673413471194634594f13e706980f267716.
I verified that showExactValue remains disabled by default and is gated to read-only Rate instances, while allowHalf retains its existing interactive behavior. The submitted repository scope passes 2/2 suites, 46/46 tests, and 7/7 snapshots. TypeScript and source lint also pass with zero errors (one unchanged useEffect dependency warning), and ESM, CJS, declaration, and Less compilation complete successfully.
A temporary independent matrix covered 0.1, 1.999999999, and 2.25 across RTL rendering, confirming the exact 10%, 99.9999999%, and 25% clip widths. A controlled rerender also verified that disabling showExactValue removes the dynamic width and half-state class instead of leaving stale exact-value presentation. All 4 added probes passed and were removed after validation.
The only remote failure is the fork Vercel authorization gate, not a source check.
Codex-assisted review: Codex traced the Rate/Star display precedence, ran the full repository and build validation, and executed the isolated boundary matrix in a detached exact-head worktree. No repository files were changed.
为 Ant Design Rate 精细显示需求提供 rc-rate 底层支持。
本改动用于实现 Ant Design #52986 提出的 Rate 只读模式展示体验优化,使组件能够准确展示 3.8、4.7、4.9 等非整星、非半星评分。
Summary by CodeRabbit
新功能
showExactValue配置,默认关闭,并支持 RTL(从右到左)布局。文档
测试