fix: render custom step icons - #396
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. |
|
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 ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. Walkthrough本次变更使默认 Changes自定义图标渲染
Estimated code review effort: 1 (简单) | ~5 分钟 Merge Risk: ⚪ Minimal · up to This restores rendering for supported custom step icons while preserving the existing override path. The change is localized and merge-ready after normal checks, with no actionable merge-blocking risk remaining. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #396 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 99 99
Branches 38 38
=========================================
Hits 99 99 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
iconinside the defaultStepIconcontainericonRenderoverride path by passing it the populated origin nodeProblem
StepItem.iconis public and the official customIcon demo supplies JSX and string icons, but the current semantic Step implementation initializes an empty<StepIcon />. Without aniconRendersupplied by a wrapper, every custom icon is therefore dropped while the item still receives the custom class.On the unmodified current master (
95b7a56), the new assertion failed because.rcicon-cloudwas absent. This change restores the standalone rc-steps behavior with the smallest possible change.Validation
npm test -- --runInBand(24 tests, 13 snapshots)npm run tscnpm run lintnpm run compilenpx prettier --check src/Step.tsx tests/index.test.tsxI also checked all open PR changed files and searched open issues/PRs for the same custom-icon rendering regression; no current overlap was found. PR #108 touches an old JavaScript Step implementation for a different finish/error step-number option.
AI assistance disclosure: Codex was used to trace the regression, audit current overlap, implement the minimal change, and run validation. The failure was reproduced on the exact upstream base before the implementation change.
Summary by CodeRabbit
Bug 修复
测试