fix(components): allow partial ui overrides on items - #6979
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 (25)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change updates 25 exported Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable current-head risk is established; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: |
🔗 Linked issue
Resolves #6974
❓ Type of change
📚 Description
The per-item
uifield is typed asPick<Component['slots'], ...>.Pickonly keeps a key optional if the source type declares it that way, andComponent['slots']falls back to an index signature whenever the generated#build/ui/*theme types don't resolve — in a Vue project without the#build/ui/*path alias, for example. Picking literal keys off an index signature makes every one of them required, so setting a single slot likeui: { linkLeadingIcon: '...' }fails to type-check with "missing the following properties: label, link, content, item, and 18 more", even thoughtv()merges partial slot overrides fine at runtime.Wrapped each of those picks in
Partial, which matches the runtime behaviour and is a no-op when the theme types do resolve. Same change on every component carrying a per-itemuifield, since they all share the pattern.v5carries the same pattern, so let me know if you want a companion PR there.📝 Checklist