From b6834dadcf757515f174e3966c3dbd3936f6b2c0 Mon Sep 17 00:00:00 2001 From: dsc Date: Wed, 9 May 2012 13:04:40 -0700 Subject: [PATCH] Updates deps, adds more docs. --- docs/framework.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/todo.md | 7 ------ package.co | 4 ++- package.json | 6 +++- 4 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 docs/framework.md diff --git a/docs/framework.md b/docs/framework.md new file mode 100644 index 0000000..93cc3bb --- /dev/null +++ b/docs/framework.md @@ -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": + - `
` + - ...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 + + diff --git a/docs/todo.md b/docs/todo.md index 0d2651a..baea50c 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -156,11 +156,6 @@ - Generate UUID for `Graph.id` -### Backbone Base -- Subview convention for attaching the element: `@$el.find '.____-subview' .replaceWith subview.el` - - - ## notes @@ -168,8 +163,6 @@ ### 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 diff --git a/package.co b/package.co index d703c2f..a341841 100644 --- a/package.co +++ b/package.co @@ -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' diff --git a/package.json b/package.json index 00eff39..4f375bb 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,19 @@ "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" -- 1.7.0.4