Repository navigation
fix(BarStack): normalize a lone rectangle so single negative bars round at the outer end - #7896
Conversation
…nd at the outer end
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. Walkthrough
ChangesSingle-bar rectangle bounds
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change normalizes lone stack rectangles, and the added tests cover negative dimensions and single negative bars. No actionable merge risk remains beyond normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Bundle ReportChanges will increase total bundle size by 681 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: recharts/bundle-cjsAssets Changed:
view changes for bundle: recharts/bundle-umdAssets Changed:
view changes for bundle: recharts/bundle-treeshaking-cartesianAssets Changed:
view changes for bundle: recharts/bundle-es6Assets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7896 +/- ##
=======================================
Coverage 88.85% 88.85%
=======================================
Files 643 643
Lines 15744 15744
Branches 4128 4129 +1
=======================================
Hits 13990 13990
Misses 1560 1560
Partials 194 194 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Test Results SummaryThis comment shows the latest test results for this pull request.
ℹ️ About Flakiness.io in GitHubYour team has set up Flakiness.io pull request comments. This comment is updated when
Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit. |
In a BarStack with negative values, an index with only one bar got its rounded corners at the zero line instead of at the outer end of the bar. With two or more bars at the same index it was fine. expandRectangle merges the bar rectangles of a stack and normalizes them with min and max, but when there was only one rectangle it returned it unchanged and kept its negative height, so the corner radius landed at y + height, which is the zero line. Now a single rectangle goes through the same normalization. Thanks to the reporter of #7895 for the report, the rendered clip path comparison and the pointer to expandRectangle.
Tests: unit tests for a lone rectangle with negative height and width, and a chart test with one single-bar index and one two-bar index. The test results come from the patch builder and I did not rerun them. Full npm test, storybook, visual regression and build were not run.
Fixes #7895.
Summary by CodeRabbit