Fixed
Project:
Custom Elements
Version:
3.3.6
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2026 at 15:32 UTC
Updated:
14 Apr 2026 at 07:35 UTC
Jump to comment: Most recent
Custom elements preview providers need to hydrate when using JS-frameworks like Nuxt. For good canvas integration, we need to be able to drop hydration markers after hydrating. See parent ticket for more context.
Remove hydration markers in nuxt preview provider. Come-up with a generic naming everyone can implement.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fagoComment #4
fagoRelevant fix is the MR to custom elements.
Comment #5
fagoThis works good. But I noted we have a few perf optimizations todo also, atm we cause some unnecessary re-render in browsers by not-hidden divs, let's try to improve:
Suggested change:
1. display: contents on nuxt-preview-container - wrapper becomes layout-transparent, Vue components are direct grid/flex items
2. display: none on slot containers - completely absent from layout tree, zero reflow cost when removed
Will file another MR for that.
Comment #8
fagoattached is another MR which improves loading performance. much better, remaining bottle neck is using the nuxt dev server if done so:
Here is some measurement of reloads in canvas:
Production build: 167ms total. Nuxt ready at 159ms vs 627ms in dev mode - 4x faster bootstrap.
┌─────────────────────┬───────┬────────┐
│ │ Dev │ Prod │
├─────────────────────┼───────┼────────┤
│ App-loader injected │ 97ms │ 81ms │
├─────────────────────┼───────┼────────┤
│ Nuxt ready │ 627ms │ 159ms │
├─────────────────────┼───────┼────────┤
│ All rendered │ 647ms │ ~170ms │
├─────────────────────┼───────┼────────┤
│ Total │ 647ms │ ~170ms │
└─────────────────────┴───────┴────────┘
Comment #10
fago