feat(suspense): support rendering of Vapor components#14157
feat(suspense): support rendering of Vapor components#14157edison1105 merged 9 commits intominorfrom
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.
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.
|
Just to check, this only adds support for VDOM Suspense containing Vapor components, right? Using Suspense in a Vapor component is not yet implemented. |
|
yes |
|
@edison1105 Is there a plan to open a new issue to track the progress of VaporSuspense? |
No description provided.