rikulo / bootjack

Twitter Bootstrap ported in Dart.
https://quire.io
Apache License 2.0
88 stars 15 forks source link

Refine the widget registration to allow JS minifying and 3rd plugins #1

Closed tomyeh closed 11 years ago

tomyeh commented 11 years ago

The design of use is not right:

  1. 3rd party widget can't be plugged in
  2. minifier can not eliminate unused widgets.

One possible solution:

  1. rename _register() to use()
  2. remove Bootjack.use()
  3. use Widget.use() instead.

For example,

Dropdown.use();
Tab.use();

The drawback: too wordy if you're going to use a lot of widgets.

Bootjack.useDefault() can be used for registering all default widgets.

simonpai commented 11 years ago

Ready since 2013/5/6.