fix(TreeSelect): prevent clear-button slot error in Popover (DS-5393) - #449
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTreeSelect now provides Button slot context for its rendered form and popover content. A regression test verifies that a clearable TreeSelect renders inside an open Popover.Body without throwing. ChangesTreeSelect popover rendering
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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 |
|
Visit the preview URL for this PR (updated for commit 52c3a13): https://react-koobiq-next--prs-449-q6jatdap.web.app (expires Tue, 11 Aug 2026 12:19:53 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: fc29847d4a9e5cb1adf458c76a9b681c76e2eeff |
There was a problem hiding this comment.
🟢 Ready to approve
The change matches established patterns in similar components and includes a targeted regression test for the reported render error.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Fixes a runtime render error when TreeSelect is used inside a Popover with isClearable enabled by ensuring the expected ButtonContext slots are always defined for the clear button.
Changes:
- Wrap
TreeSelectInnermarkup with a@koobiq/react-primitivesProviderthat definesButtonContextslots for the default andclear-buttonslots. - Add a regression test that renders a clearable
TreeSelectinsidePopoverand asserts it does not throw.
File summaries
| File | Description |
|---|---|
| packages/components/src/components/TreeSelect/TreeSelect.tsx | Adds a Provider supplying ButtonContext slot definitions to prevent slot-related errors when nested under other providers (e.g., Popover). |
| packages/components/src/components/TreeSelect/TreeSelect.test.tsx | Adds a regression test to verify clearable TreeSelect renders without throwing inside a Popover. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary by CodeRabbit