Refactor components for attribute fallthrough - #2
Conversation
|
Warning Review limit reached
Next review available in: 104 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesVue control runtime updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: 🟡 Moderate · up to The refactor changes how component attributes and optional control props are handled. MatchModeEditor can currently drop consumer attributes and listeners and emit Vue warnings, while ValueSelector may turn omitted Boolean options into false; these bounded compatibility issues should be fixed before merge. Sequence Diagram(s)sequenceDiagram
participant QueryBuilder
participant RuleComponents
participant DefaultControl
participant DOM
QueryBuilder->>RuleComponents: Render query controls
RuleComponents->>DefaultControl: Pass declared control props
DefaultControl->>DOM: Forward consumer attributes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/vue-querybuilder/src/components/controlProps.test.ts`:
- Around line 64-105: Add a list-valued field with a values collection and a
corresponding rule to the test fixtures, ensuring the QueryBuilder renders
valueSelector. After rendering, explicitly assert that received.valueSelector
has at least one recorded prop before evaluating the complete-coverage
assertion, so the gate cannot pass without exercising that control.
In `@packages/vue-querybuilder/src/components/MatchModeEditor.vue`:
- Around line 16-19: Update MatchModeEditor to explicitly route fallthrough
attributes, including id, class, and listeners, to the intended child control or
wrap both roots in a single element that receives $attrs. Preserve the existing
component structure and add regression coverage verifying these attributes reach
the rendered control.
In `@packages/vue-querybuilder/src/components/ValueSelector.vue`:
- Around line 19-25: Update the props declaration in ValueSelector using
VersatileSelectorProps to explicitly default disabled, multiple, and
listsAsArrays to undefined, preserving undefined when those optional Boolean
props are absent rather than allowing Vue to cast them to false.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bec355ca-8b47-4fae-a02b-580ea4d57f8e
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (23)
AGENTS.mdCHANGELOG.mddocs/customization.mddocs/differences-from-react-querybuilder.mdpackages/vue-querybuilder/package.jsonpackages/vue-querybuilder/src/components/ActionElement.vuepackages/vue-querybuilder/src/components/InlineCombinator.vuepackages/vue-querybuilder/src/components/MatchModeEditor.vuepackages/vue-querybuilder/src/components/NotToggle.test.tspackages/vue-querybuilder/src/components/NotToggle.vuepackages/vue-querybuilder/src/components/ShiftActions.test.tspackages/vue-querybuilder/src/components/ShiftActions.vuepackages/vue-querybuilder/src/components/UndoRedoActions.test.tspackages/vue-querybuilder/src/components/UndoRedoActions.vuepackages/vue-querybuilder/src/components/ValueEditor.vuepackages/vue-querybuilder/src/components/ValueSelector.vuepackages/vue-querybuilder/src/components/controlProps.test.tspackages/vue-querybuilder/src/composables/context.test.tspackages/vue-querybuilder/src/composables/context.tspackages/vue-querybuilder/src/composables/useQueryBuilder.test.tspackages/vue-querybuilder/src/composables/useQueryBuilder.tspackages/vue-querybuilder/src/internal/RuleComponents.vuepackages/vue-querybuilder/src/types/types.test-d.ts
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
controlKeysexport and updated core version requirements.