SitePen / dojo-amd-converter

A legacy dojo to AMD conversion utility.
Other
11 stars 5 forks source link

_Widget not converted #26

Open mmaxwell opened 11 years ago

mmaxwell commented 11 years ago

_Widget is not converted to dijit/_WidgetBase.

brianarn commented 11 years ago

This sort of conversion seems like it may potentially be unsafe, given that _Widget brings in some of the automatic onClick etc camelcased DOM events. Does seem like it might be a good idea to issue some sort of notice/warning when using _Widget (or _Templated) though.

mmaxwell commented 11 years ago

In the source of _Widget, it states "Old base class for widgets. New widgets should extend dijit/_WidgetBase instead". If the goal of this tool is to help in converting from older versions of dojo to 2.0, it seems like this should be what we want to do.

kfranqueiro commented 11 years ago

In this case it's not about moving forward, it's about not breaking existing code. As Brian stated, _Widget contains stuff that _WidgetBase does not, so upconverting from _Widget to _WidgetBase might cause regressions in people's code.

brianarn commented 11 years ago

I do like the idea of having some sort of flag or way to issue a warning, though, as a handy tip.

wkeese commented 11 years ago

FYI, conversion of _Widget to _WidgetBase is pretty complicated:

Ideally you could do the conversion but it's a lot of work.

mmaxwell commented 11 years ago

I believe we are holding off on this piece until _Widget goes away.