Refactor barSelectors so that they read axis IDs from state instead of props#6723
Refactor barSelectors so that they read axis IDs from state instead of props#6723
Conversation
WalkthroughThis pull request refactors bar selector signatures to accept a single GraphicalItemId (bar identifier) instead of separate xAxisId and yAxisId parameters. Selectors now derive axis associations internally from per-bar state settings, reducing argument count and centralizing bar-to-axis mapping logic. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Suggested reviewers
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 (6)
🧰 Additional context used📓 Path-based instructions (8)**/*.{ts,tsx}📄 CodeRabbit inference engine (DEVELOPING.md)
Files:
{test,www/test}/**/*.spec.{ts,tsx}📄 CodeRabbit inference engine (DEVELOPING.md)
Files:
test/**/*.spec.{ts,tsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{js,ts,tsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
test/**/*.{test,spec}.{ts,tsx}📄 CodeRabbit inference engine (test/README.md)
Files:
**/*.spec.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (DEVELOPING.md)
Files:
src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (9)📚 Learning: 2025-11-25T01:23:08.250ZApplied to files:
📚 Learning: 2025-11-25T01:23:08.250ZApplied to files:
📚 Learning: 2025-11-25T01:23:08.250ZApplied to files:
📚 Learning: 2025-11-25T01:23:08.250ZApplied to files:
📚 Learning: 2025-11-25T01:23:08.250ZApplied to files:
📚 Learning: 2025-11-25T01:22:59.729ZApplied to files:
📚 Learning: 2025-11-23T13:30:10.395ZApplied to files:
📚 Learning: 2025-11-19T14:08:01.728ZApplied to files:
📚 Learning: 2025-11-25T01:22:59.729ZApplied to files:
🧬 Code graph analysis (3)test/cartesian/XAxis/XAxis.padding.spec.tsx (1)
test/cartesian/Bar.truncateByDomain.spec.tsx (1)
test/cartesian/XAxis/XAxis.barSize.spec.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (23)
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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6723 +/- ##
==========================================
- Coverage 94.03% 94.02% -0.01%
==========================================
Files 500 500
Lines 42662 42688 +26
Branches 4901 4917 +16
==========================================
+ Hits 40116 40139 +23
- Misses 2541 2544 +3
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 2.69kB (0.1%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: recharts/bundle-umdAssets Changed:
view changes for bundle: recharts/bundle-es6Assets Changed:
view changes for bundle: recharts/bundle-cjsAssets Changed:
|
Description
Select data from state instead of props to keep the API simpler.
Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.