-
-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(runtime-vapor): enable injection from VDOM parent to slotted vapor child #14167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes injection context propagation by enabling slotted Vapor child components to properly inject values provided by their VDOM parent components. The fix ensures the parent component's context is active during slot mounting.
- Added
parentComponentparameter to theslotmethod in the Vapor interop interface - Set the current instance to the parent component during vapor slot mounting to establish proper injection context
- Added comprehensive test coverage for the VDOM parent to Vapor child injection scenario
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/runtime-vapor/src/vdomInterop.ts | Sets current instance to parentComponent during slot mounting to enable proper injection context for slotted vapor children |
| packages/runtime-core/src/apiCreateApp.ts | Updated VaporInteropInterface.slot signature to include parentComponent parameter |
| packages/runtime-core/src/renderer.ts | Passed parentComponent argument when calling the slot method during VaporSlot processing |
| packages/runtime-vapor/tests/apiInject.spec.ts | Added test case verifying injection works from VDOM parent to slotted Vapor child, plus cleanup setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.