Skip to content

fix(TransitionGroup): not warn unkeyed text children with whitespece preserve#11888

Merged
yyx990803 merged 1 commit into
mainfrom
edison/fix/11885
Sep 13, 2024
Merged

fix(TransitionGroup): not warn unkeyed text children with whitespece preserve#11888
yyx990803 merged 1 commit into
mainfrom
edison/fix/11885

Conversation

@edison1105

Copy link
Copy Markdown
Member

close #11885

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 37.7 kB 34 kB
vue.global.prod.js 159 kB 57.6 kB 51.3 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.8 kB 18.8 kB 17.2 kB
createApp 55.3 kB 21.2 kB 19.4 kB
createSSRApp 59.3 kB 22.9 kB 20.9 kB
defineCustomElement 60 kB 22.8 kB 20.7 kB
overall 69 kB 26.3 kB 23.9 kB

@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2024

Copy link
Copy Markdown

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@11888

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@11888

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@11888

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@11888

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@11888

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@11888

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@11888

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@11888

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@11888

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@11888

vue

pnpm add https://pkg.pr.new/vue@11888

commit: 4c546cc

@edison1105 edison1105 added ready to merge The PR is ready to be merged. scope: transition 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Sep 11, 2024
@LeftGamer1

LeftGamer1 commented Sep 11, 2024

Copy link
Copy Markdown

Thanks for the fix, what is the approximate release date?
Also is this OK that there is still additional VNodes? For example when console.logging slot
image

Checked out on Vue2 with the same code - everything fine, only real children without whitespace VNodes.
Will reproduce on sandbox in a 5 min

Update: Vue2 sandbox

image

@edison1105

Copy link
Copy Markdown
Member Author

@LeftGamer1

Thanks for the fix, what is the approximate release date?

I'm not sure exactly when to merge, after all, it's just a warning, it's not a high-priority.

Checked out on Vue2 with the same code - everything fine, only real children without whitespace VNodes.

I'm not sure how transitionGroup in Vue 2 handles whitespace, but in Vue 3, if whitespace: preserve is present, whitespace will also need to be rendered.

@LeftGamer1

Copy link
Copy Markdown

@edison1105 just curious, can this somehow affect the performance of TransitionGroup or make some uncontrolled bugs because of empty vnodes? What do you think?

@edison1105

Copy link
Copy Markdown
Member Author

@LeftGamer1 Probably not, since text node doesn't apply animations

if (child.el && child.el instanceof Element) {

@LeftGamer1

Copy link
Copy Markdown

@edison1105 ohhhh, missed this line
Thanks a lot, will be waiting for a new Vue release 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged. scope: transition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Vue warn]: <TransitionGroup> children must be keyed. With whitespace = 'preserve'

3 participants