Skip to content
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

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

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

edison1105
Copy link
Member

close #11885

Copy link

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

Copy link

pkg-pr-new bot commented Sep 11, 2024

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
Copy link

LeftGamer1 commented Sep 11, 2024

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
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

@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
Member Author

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

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

@LeftGamer1
Copy link

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

@yyx990803 yyx990803 merged commit 7571f20 into main Sep 13, 2024
15 checks passed
@yyx990803 yyx990803 deleted the edison/fix/11885 branch September 13, 2024 10:37
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