fix: honor zero rail width - #326
Conversation
|
@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #326 +/- ##
=======================================
Coverage 99.35% 99.35%
=======================================
Files 7 7
Lines 156 156
Branches 52 52
=======================================
Hits 155 155
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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 (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. Walkthrough本次修改让 Changes轨道宽度处理
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change preserves an explicitly configured rail width of zero for line and circle progress while retaining defaults for omitted values, with regression coverage for both renderers. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Summary
railWidth={0}for line progressProblem
Both renderers selected the rail width with
railWidth || strokeWidth. Because zero is a valid numeric SVG stroke width, explicitly settingrailWidth={0}was replaced by the trackstrokeWidthand the rail remained visible. Nullish fallback keeps the documented default behavior for omitted values while honoring zero.Validation
rc-test --runInBand(4 suites, 21 tests, 11 snapshots)tsc --noEmitsrc/(no errors; one existing unused-disable warning)git diff --checkI checked the current issues and open PRs, including #214, whose
Line.tsxchange concerns zero-length subpath opacity rather than rail width. I found no duplicate for zerorailWidthhandling.Summary by CodeRabbit
Bug 修复
0时被错误回退的问题。Line和Circle组件现可正确应用railWidth={0}。测试
0时的显示结果。