maqetta/maqetta — Issue #1088: Remove WidgetLite class
Author: JonFerraiolo
Created: 2011-10-21 18:07:48+00:00
State: open

WidgetLite replicates parts of various Dijit classes, where we were trying to minimize footprint when using Dijit, but given Dojo nano and AMD, better to remove this class from Maqetta and instead invoke the minimal parts of Dijit that are needed.

Here is some background discussion discussion:

@jonferraiolo asks:

Anyone remember the reason for having davinci/workbench/WidgetLite.js? It looks like similar to dijit._WidgetsInTemplateMixin.js. The primary purpose seems to be recursively calling the Dojo parser on the innerHTML for a widget. (There is also code for destroying tooltips in WidgetLit.js, but I haven't found where those tooltips might have been created.)

It seems dangerous to replicate parts of Dojo within our code because Dojo evolves and we are likely to forget to evolve our code in parallel. Is there a handy Dojo class that we can inherit from instead of WidgetLite.js to prevent future bugs as Dojo changes underneath us?

Here is result of grep on 'WidgetLite':

```
$ grep -rn WidgetLite *
ui/widgets/FileFieldDialog.js:4:dojo.require('davinci.workbench.WidgetLite');
ui/widgets/FileFieldDialog.js:13:dojo.declare("davinci.ui.widgets.FileFieldDialog", [davinci.workbench.WidgetLite], {
ui/widgets/FolderSelection.js:4:dojo.require('davinci.workbench.WidgetLite');
ui/widgets/ThemeSelection.js:4:dojo.require('davinci.workbench.WidgetLite');
ve/widgets/Cascade.js:2:dojo.require('davinci.workbench.WidgetLite');
ve/widgets/Cascade.js:14:dojo.declare("davinci.ve.widgets.Cascade", [davinci.workbench.WidgetLite], {
ve/widgets/Trblbox.js:7:dojo.require('davinci.workbench.WidgetLite');
ve/widgets/Trblbox.js:12:dojo.declare("davinci.ve.widgets.Trblbox", [davinci.workbench.WidgetLite], {
workbench/ViewLite.js:5:dojo.require("davinci.workbench.WidgetLite");
workbench/ViewLite.js:7:dojo.declare("davinci.workbench.ViewLite", [davinci.workbench.WidgetLite], {
workbench/WidgetLite.js:1:dojo.provide("davinci.workbench.WidgetLite");
workbench/WidgetLite.js:5:dojo.declare("davinci.workbench.WidgetLite", [dijit._Widget], {
$
```

@childsb says:

WidgetLite was an attempt to make a simpler version of the dijit.widget class.

Back when we first started, there was a bit of churn on the proper way to write efficient widgets. People were saying that using dijit.widget was too heavy, so WidgetLite was an attempted best of both worlds.

It's probably safe to get rid of it and just use the dijit.widget.