fix: legend should not report its size when there is an external portal#6609
fix: legend should not report its size when there is an external portal#6609
Conversation
WalkthroughThe Legend component is modified to conditionally render the LegendSizeDispatcher component only when no portal target is provided. Size dispatch computations are now bypassed for portal scenarios while maintaining existing behavior for non-portal usage. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 @@
## main #6609 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 493 493
Lines 41068 41068
Branches 4773 4774 +1
=======================================
Hits 38672 38672
Misses 2391 2391
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 747 bytes (0.03%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: recharts/bundle-es6Assets Changed:
view changes for bundle: recharts/bundle-cjsAssets Changed:
view changes for bundle: recharts/bundle-umdAssets Changed:
|
023aa80 to
f1b240d
Compare
PavelVanecek
left a comment
There was a problem hiding this comment.
This would be nice to mention in the docs I think. Just in case someone decides to portal Legend somewhere inside the chart and then wonder why did the dimensions change.
|
Looks like we're missing |
Description
Related Issue
#6608
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Summary by CodeRabbit