-
-
Notifications
You must be signed in to change notification settings - Fork 9k
feat(suspense): support rendering of Vapor components #14157
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
…se to renderer-specific `registerDep` callbacks.
|
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: |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
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 adds support for rendering vapor components within vdom Suspense boundaries by propagating the parent suspense context through the interop layer and handling async setup in vapor components.
- Adds
parentSuspenseparameter to vdom interop mount/hydrate methods - Implements suspense context management for vapor components with async setup
- Extracts
handleSetupResultlogic into a reusable function to support async resolution
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime-vapor/src/vdomInterop.ts | Adds parentSuspense parameter to mount/hydrate methods and implements suspense context save/restore logic; guards unmount for unresolved async components |
| packages/runtime-vapor/src/components/Suspense.ts | New file implementing setParentSuspense for managing global suspense context and placeholder for VaporSuspenseImpl |
| packages/runtime-vapor/src/component.ts | Adds async setup detection, suspense-related instance properties, and extracts handleSetupResult function; handles async deps in mountComponent |
| packages/runtime-vapor/tests/components/Suspense.spec.ts | Comprehensive test coverage for vdom Suspense with vapor components including nested async components and unmounting scenarios |
| packages/runtime-core/src/renderer.ts | Refactors registerDep callback to use new simplified interface, delegates setup result handling to callback |
| packages/runtime-core/src/hydration.ts | Adds parentSuspense parameter to hydration interop calls |
| packages/runtime-core/src/components/Suspense.ts | Updates registerDep interface to accept generic onResolve callback instead of render-specific parameters |
| packages/runtime-core/src/component.ts | Adds interface definitions for suspense-related properties on component instances |
| packages/runtime-core/src/apiCreateApp.ts | Updates VaporInteropInterface to include parentSuspense parameter in method signatures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.