Conversation
|
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 (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The select triggers retain their field-group styling while slot content is isolated, with focused coverage for both components. 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 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 |
commit: |
benjamincanac
left a comment
There was a problem hiding this comment.
What do you think about resetting the context directly in useFieldGroup instead? 🤔 The leak isn't specific to Select and SelectMenu, it happens in every component that calls it like Button, Badge, Input or InputMenu. Adding this right after the inject fixes them all without touching the templates, and wrappers like UTooltip or UDropdownMenu still propagate since they don't call it:
provide(fieldGroupInjectionKey, computed(() => ({ size: undefined, orientation: undefined })))
🔗 Linked issue
Resolves #6945
❓ Type of change
📚 Description
When a
USelectorUSelectMenuis placed inside aUFieldGroup, components rendered in the trigger's#leading,#defaultand#trailingslots inherit the field group context.For example, a
UBadgein the#defaultslot receives the horizontal field group classes (not-only:first:rounded-e-none …). Because it is the first of several children inside the trigger, its right corners become square: