-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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(runtime): CSSVars can work with Teleport #7344
base: main
Are you sure you want to change the base?
Conversation
} | ||
} | ||
if (isArray(vnode.children)) { | ||
vnode.children.forEach(n => observeTeleportTarget(n as VNode)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
see here |
419dcc4
to
b34e64f
Compare
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, |
@baiwusanyu-c |
ok,let me see how to fix |
Do some refinement and unit testing tomorrow 🤣 |
❌ Deploy Preview for vuejs-coverage failed.
|
# Conflicts: # packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap
# Conflicts: # packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap
…SVars # Conflicts: # packages/runtime-core/__tests__/components/Suspense.spec.ts
# Conflicts: # packages/runtime-core/__tests__/components/Suspense.spec.ts
…SVars # Conflicts: # packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
Size ReportBundles
Usages
|
# Conflicts: # packages/runtime-core/__tests__/components/Suspense.spec.ts
# Conflicts: # packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
CodSpeed Performance ReportMerging #7344 will not alter performanceComparing Summary
|
# 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
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Since this PR adds a new export to the The Nuxt test failure was due to this. Not a blocker, though. |
…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
close: #7312