-
Notifications
You must be signed in to change notification settings - Fork 38
Integrate VDOM system into widget-core #725
Description
Enhancement
We currently leverage maquette for our vdom management, this has served us well so far but we’re now getting to the point were it would be preferable if we had our own integrated into the widget system. There are few major reasons for this:
- We have to do a lot of extra work in WidgetBase to manage
DNode
s and Widget instances. This is quite costly having to effectively iterate a tree to generate intermediateVNode
s for Maquette, as well as the memory overheads. - Provide additional lifecycle hooks over the standard ones provided by the Maquette's existing implementation.
- Freedom to extend / modify the vdom functionality specifically for widget-core.
The Proposal is to fork Maquette into the widget-core codebase and convert it to deal with DNode
and widget instance management directly to achieve feature parity with the current implementation.
There are a few outstanding issues that this move will help facilitate:
Support after/deferred property callbacks when creating VDOM - We will have full control of the lifecycle so can implement a deferred property system
Only require key
for adjacent sibling widgets - This will be fixed for free as part of the moving to one tree for widgets and nodes
Additional options bag in v() that supports explicit props and attributes - We will be able to support a more user friendly options bag
Consider performance/memory improvements with .classes() in Themeable -
We will be able to take all the heavy lifting off this.classes
by building in support for toggling classes based on presence
Unify event model - We will have full control of the event system
Note: This is a breaking change and will have knock on effects for downstream packages such as @dojo/widgets
and @dojo/test-extras
(big impact on this).