tupilabs / vue-lumino

A component to use Vue.js with Jupyter Lumino (PhosphorJS), integrating DOM & VDOM through event listeners and Vue reactivity system.
Apache License 2.0
81 stars 6 forks source link

Use Vue's teleport #53

Open kinow opened 1 year ago

kinow commented 1 year ago

e.g.: https://github.com/cylc/cylc-ui/pull/1318

kinow commented 8 months ago

This probably cannot be implemented due to how we treat the children tabs/components (we do not have a fixed type, trying to be generic). To be reviewed and documented in a future release.

kinow commented 8 months ago

This library tries to add components as they are as Lumino tabs. This means without requiring any changes to the components, any props, nothing. It will use the .name to fetch the name of the component (which every Vue component should have, I believe), and then create a LuminoWidget and sync it programmatically to the DOM, instead of with Vue3 Teleport.

That's because we receive all the components in the default slot, with no easy way to iterate through each component and teleport them to somewhere else. Will leave this open and pinned in case later we realize that there is actually a way to use it, or if there is a pull request submitted, more ideas, etc.