feat(AuthForm): add separator slot#6305
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes update src/runtime/components/AuthForm.vue by adding an optional named slot Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/runtime/components/AuthForm.vue (1)
230-236: Add tests for the newseparatorslot behavior.Please add a spec covering
slots: { separator: ... }(including rendering when providers/fields are absent), since currenttest/components/AuthForm.spec.tscoversseparatorprop but not the new slot path.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/runtime/components/AuthForm.vue` around lines 230 - 236, Add a unit test in test/components/AuthForm.spec.ts that mounts AuthForm.vue with providers and fields empty (or absent) and supplies a slots: { separator: '<div data-test="sep">MySep</div>' } value, then assert the separator slot content is rendered (data-test="sep") when providers/fields are absent; also add a complementary case where providers/fields exist to ensure the slot still renders under the existing condition. Use the component name AuthForm and the slot name "separator" to locate the behavior to test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/runtime/components/AuthForm.vue`:
- Around line 230-236: Add a unit test in test/components/AuthForm.spec.ts that
mounts AuthForm.vue with providers and fields empty (or absent) and supplies a
slots: { separator: '<div data-test="sep">MySep</div>' } value, then assert the
separator slot content is rendered (data-test="sep") when providers/fields are
absent; also add a complementary case where providers/fields exist to ensure the
slot still renders under the existing condition. Use the component name AuthForm
and the slot name "separator" to locate the behavior to test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: aec8c91b-cad7-47e9-b2f0-c1c64331bf99
📒 Files selected for processing (1)
src/runtime/components/AuthForm.vue
commit: |
separator slot
Summary
Adds a
separatorslot toAuthForm, allowing custom content between the providers and the form fields instead of being locked toUSeparator.Changes
separatortoAuthFormSlotstypeUSeparatorin<slot name="separator">so it remains the default but can be overriddenproviders + fieldsare both present, or when the slot is explicitly providedUsage