Updates deps, adds more docs.
authordsc <dsc@wikimedia.org>
Wed, 9 May 2012 20:04:40 +0000 (13:04 -0700)
committerdsc <dsc@wikimedia.org>
Wed, 9 May 2012 20:04:40 +0000 (13:04 -0700)
docs/framework.md [new file with mode: 0644]
docs/todo.md
package.co
package.json

diff --git a/docs/framework.md b/docs/framework.md
new file mode 100644 (file)
index 0000000..93cc3bb
--- /dev/null
@@ -0,0 +1,57 @@
+# UI Base Framework
+
+Notes from working with Backbone, Bootstrap, and other friends.
+
+
+## Bootstrap Enhancements
+
+### CSS Classes
+- Apple-style tokens/tags
+- Table styles for "active", "error", etc
+- Table highlights (like stickies in a book)
+- Container Shadow Lines (horizontal & vertical)
+- Lion-style scrollbars
+
+
+### Components
+- Better Isotope integration
+- Tear-away / Pop-out containers
+- Facebook-style Thing Selector, with filtering, a drag-n-drop hopper, etc
+- On-hover Components (like changing to a button, expanding, etc); also, +HoverIntent
+
+
+## Backbone Base
+
+- Nested Models are a huge painpoint
+- A more coherent "loading" event model is needed
+- How can we unify a view's root DOM element with the view?
+    - Free event bubbling between views
+    - Eliminate the "I heard an event, what view handles it?" dance
+    - Reduces need for some boilerplate views
+    - Data properties to create "anonymous inner views":
+        - `<div data-view="ViewClass" data-view-extends="SuperViewClass" data-model="ModelClass" />`
+        - ...then need some sort of IOC-style wiring to hand out objects
+    - Requires rich events with nested properties that can be used for filtering on subscribe
+- A View has many `ViewField`s, mapping to the model's attributes.
+    - Implicitly created for simple fields (text, form elements)
+    - Handles data-binding:
+        - Serialization for presentation formatting
+        - Deserialization back into typed value
+        - Fires element-specific `change` events
+    - Subclasses for:
+        - Rich widgets (datepicker, colorpicker, etc)
+        - Dependent and derived fields
+        - Or declarative config and event binding
+- `CollectionView`, when the view holds a `Backbone.Collection`, not a `Backbone.Model`
+    - Comes with CRUD for .add(model)/remove(model), creating the needed subview, attaching it, etc
+    - Subclasses with specialized support for `ListView`, `DictView`
+    - Mixins for further subclasses for:
+        - `TableView` (and all manner of stupid subclasses)
+        - `Form{List,Dict}View`
+        - `TabPane{List,Dict}View`
+- All Views should have a `StateMachine` (also supporting the EventEmitter API) to ease coordinating event flows
+    - Significantly simplifies "loading" and "waiting" states
+    - Trivial to "disable" elements
+    - Easy modal UIs
+
+
index 0d2651a..baea50c 100644 (file)
 - Generate UUID for `Graph.id`
 
 
-### Backbone Base
-- Subview convention for attaching the element: `@$el.find '.____-subview' .replaceWith subview.el`
-
-
-
 
 
 ## notes
 ### UI Notes from Diederik (Future)
 
 - Relationships between datasets which can help inform rich UI responses (click on "Europe" and have it expand to the countries)
-- Legend by Default
-- value parsers for large numbers with comma, KMB.00
 - easily create new graphs side-by-side
 - clear current graph
 
index d703c2f..a341841 100644 (file)
@@ -20,16 +20,18 @@ dependencies                    :
     'nib'                       : '>= 0.4.0'
     'browserify'                : '>= 1.9.4'
     'seq'                       : '>= 0.3.5'
-    'underscore'                : '>= 1.3.2'
+    'underscore'                : '>= 1.3.3'
     'underscore.string'         : '>= 2.1.1'
     'js-yaml'                   : '>= 0.3.5'
     'hashish'                   : '>= 0.0.4'
     'backbone'                  : '>= 0.9.1'
     'findit'                    : '>= 0.1.2'
+    'glob'                      : '>= 3.1.9'
     'remove'                    : '>= 0.1.1'
 devDependencies                 : 
     'buildtools'                : 'https://github.com/dsc/node-buildtools/tarball/master'
     'expresso'                  : '>= 0.9.2'
+    'uglify-js'                 : '>= 1.2.6'
 
 scripts                         : test:'expresso'
 repository                      : type:'git', url:'git://git@less.ly:kraken-ui.git'
index 00eff39..4f375bb 100644 (file)
     "nib": ">= 0.4.0",
     "browserify": ">= 1.9.4",
     "seq": ">= 0.3.5",
-    "underscore": ">= 1.3.2",
+    "underscore": ">= 1.3.3",
     "underscore.string": ">= 2.1.1",
     "js-yaml": ">= 0.3.5",
     "hashish": ">= 0.0.4",
     "backbone": ">= 0.9.1",
     "findit": ">= 0.1.2",
+    "glob": ">= 3.1.9",
     "remove": ">= 0.1.1"
   },
   "devDependencies": {
     "buildtools": "https://github.com/dsc/node-buildtools/tarball/master",
-    "expresso": ">= 0.9.2"
+    "expresso": ">= 0.9.2",
+    "uglify-js": ">= 1.2.6"
   },
   "scripts": {
     "test": "expresso"