fix(FieldGroup): add defaultVariants in theme - #6938
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. 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 (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe field-group theme now declares default variants of Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation Issue
✨ 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.
Thanks for the PR! I pushed a small change to remove orientation from defaultVariants, we don't do it in any theme since it comes from withDefaults. size alone is enough for TVConfig to accept both in app.config.ts.
The actual cause is TVConfig only accepting defaultVariants when the theme declares one, which affects other themes too (modal, drawer, carousel...). It's already fixed in the types on v5 in #6975 so I'd rather keep the v4 change minimal 😊
defaultVariants in theme
defaultVariants in themedefaultVariants in theme
🔗 Linked issue
Resolves #6936
❓ Type of change
📚 Description
fieldGroupexposessizeandorientationvariants but omitteddefaultVariants. Since theapp.config.uioverride type is derived from the theme,app.config.ui.fieldGroup.defaultVariantswas rejected by TypeScript as an excess property.This adds the component's existing defaults (
size: 'md',orientation: 'horizontal') and a type regression check for the app-config override shape.Local verification:
pnpm lintpnpm typecheckpnpm test -- --run(7,386 passed, 6 skipped)📝 Checklist