-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
fix(ssr): ensure empty slots render as a comment node in Transition #13396
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes introduce handling for SSR rendering and hydration of Changes
Sequence Diagram(s)sequenceDiagram
participant SSR_Renderer
participant Output_Buffer
SSR_Renderer->>SSR_Renderer: Render <transition> with empty slot and transition=true
SSR_Renderer-->>Output_Buffer: Push '<!---->' (comment node)
sequenceDiagram
participant Test
participant App
participant DOM
Test->>App: Mount <Transition appear> with empty content
App->>DOM: Hydrate as comment node
Test->>App: Set show=false
App->>DOM: Update content to text node "foo"
Test->>DOM: Assert correct node and no hydration warnings
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
While the initial hydration is no longer throwing an error, it seems that subsequent updates still fail: There are also problems in this case, which doesn't use |
a4bcf83
to
109a4d1
Compare
3983741
to
a6d8b6e
Compare
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
@skirtles-code The underlying problem is that the CSR renders a comment vnode but the server output has nothing. with this PR, the SSR renders a comment node for an empty Transition to avoid hydration mismatch. I think there is no need to fix the following invalid usage |
a6d8b6e
to
a95feba
Compare
What do you think about this case, with the |
Updated. |
There still seems to be a problem when the parent uses a render function: The original issue came from some code on Vue Land, which was using a render function like this. For the slot I'm using |
close #13394
Summary by CodeRabbit