Skip to content

Conversation

baiwusanyu-c
Copy link
Member

close: #7312

@baiwusanyu-c baiwusanyu-c changed the title fix(runtime): cssVars can work with Teleport fix(runtime): CSSVars can work with Teleport Dec 14, 2022
}
}
if (isArray(vnode.children)) {
vnode.children.forEach(n => observeTeleportTarget(n as VNode))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

walk vnode tree and observe all teleport node,there may be a extra performance cost
Indeed,we need further consideration

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

walk vnode tree and observe all teleport node,there may be a extra performance cost Indeed,we need further consideration

I made some modifications, but as you said, I also think that doing so will consume a lot of performance.
I think a better approach should be like suspense , which handles the cssvars update on teleport at the right time during the runtime process, but that is a big change

@moushicheng
Copy link
Contributor

see here
bug seem still alive

@baiwusanyu-c baiwusanyu-c force-pushed the bwsy/fix/teleportCSSVars branch from 419dcc4 to b34e64f Compare December 16, 2022 07:36
@baiwusanyu-c
Copy link
Member Author

I store the 'data-owner-value' in the 'parentComponent' when the element is unmounted, and reset it when it is updated. And maintain a variable 'teleportUTMap' globally, store 'ut', re-execute 'ut' when updating,

@edison1105
Copy link
Member

@baiwusanyu-c
great work! but not working with this scenario

@baiwusanyu-c
Copy link
Member Author

@baiwusanyu-c great work! but not working with this scenario

ok,let me see how to fix

@baiwusanyu-c
Copy link
Member Author

Do some refinement and unit testing tomorrow 🤣

@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for vuejs-coverage failed.

Name Link
🔨 Latest commit f4a605c
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/639c7209abc1860008079a4f

@baiwusanyu-c baiwusanyu-c marked this pull request as draft December 16, 2022 13:29
@baiwusanyu-c baiwusanyu-c marked this pull request as ready for review December 17, 2022 04:45
…SVars

# Conflicts:
#	packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
@github-actions
Copy link

github-actions bot commented Oct 20, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (+683 B) 38 kB (+239 B) 34.1 kB (+157 B)
vue.global.prod.js 159 kB (+683 B) 57.8 kB (+213 B) 51.4 kB (+190 B)

Usages

Name Size Gzip Brotli
createApp 55.5 kB (+325 B) 21.3 kB (+115 B) 19.5 kB (+114 B)
createSSRApp 59.5 kB (+325 B) 23 kB (+113 B) 21 kB (+88 B)
defineCustomElement 60.2 kB (+325 B) 22.9 kB (+128 B) 20.8 kB (+51 B)
overall 69.3 kB (+325 B) 26.4 kB (+114 B) 24 kB (+99 B)

# Conflicts:
#	packages/runtime-core/__tests__/components/Suspense.spec.ts
# Conflicts:
#	packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
Copy link

codspeed-hq bot commented Dec 19, 2023

CodSpeed Performance Report

Merging #7344 will not alter performance

Comparing baiwusanyu-c:bwsy/fix/teleportCSSVars (e3e85d5) with main (bae79dd)

Summary

✅ 53 untouched benchmarks

baiwusanyu-c and others added 4 commits January 3, 2024 11:26
# Conflicts:
#	packages/runtime-core/__tests__/components/Suspense.spec.ts
#	packages/runtime-core/src/components/Teleport.ts
#	packages/runtime-core/src/renderer.ts
#	packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
#	packages/runtime-dom/src/helpers/useCssVars.ts
…SVars

# Conflicts:
#	packages/runtime-core/__tests__/components/Suspense.spec.ts
@haoqunjiang
Copy link
Member

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Apr 2, 2024

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools success success
nuxt failure success
pinia success success
quasar success success
radix-vue success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success success
vue-i18n success success
vue-macros success success
vuetify success success
vueuse success success
vue-simple-compiler success success

@haoqunjiang
Copy link
Member

haoqunjiang commented Apr 2, 2024

Since this PR adds a new export to the @vue/runtime-core package, I think it should be shipped in a minor version.

The Nuxt test failure was due to this. Not a blocker, though.

baiwusanyu-c and others added 2 commits April 16, 2024 09:02
…SVars

# Conflicts:
#	packages/runtime-core/__tests__/components/Suspense.spec.ts
#	packages/runtime-core/src/components/Teleport.ts
#	packages/runtime-core/src/renderer.ts
#	packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

v-bind style not working in some edge cases (teleport + transition, slots)

5 participants