prometheusresearch/react-grid — pull request #12 by bakesteve (2014-07-29 13:18:32+00:00)
Title: Adding keyboard nav, tests, gulp, react 0.11.1

Cleaned this up a bit, but the main changes are:

## Structure / tooling
- Added gulp, rather than makefiles (todos: less transform, and handle /docs)
- Added jshint
- Added examples folder, but really that should be merged into Docs
- Using bower for jasmine / jquery etc
- Added Test folder and a jasmine runner

## Features
### Grid Navigation
ExcelGrid wraps the Grid component and adds keyboard navigation support
Toyed with a number of ways of doing this, but the one we've gone for here is:
- ExcelGrid owns the state of what is selected
- Assume you start at row 0, col 0
- Click selects a cell
- Up/Down/Left/Right navigates, and focuses the cell
- Scrolling happens through native browser events (though think it may be better to change this #9)
- Cells get tabindexes (so that the keyboard events fire) and a class added
- Shift Key allows multiple cells to be selected
- Always have 1 ActiveCell < so that we can add editors more easily at a later date

### Scrolling
Partly as a way to get the grid working in react 0.11.0, which broke in the context and child components (being descriptors) [see](http://facebook.github.io/react/blog/2014/07/25/react-v0.11.1.html)
To make this all work, reduce complexity, and tweak some extra performance, got rid of the custom scrollbars, and revert to the Divs scroll
May have missed some crucial details, but in our tests this wouks well (bar a small issue on horizontal scroll keeping the headers in track #9)
Primarily this revolved around removing the scrollbar components, and the DOMMetrics mixin
Let me know if there are areas I misunderstood / it has introduced regressions

### React v0.11.1
As above, upgrading broke the DomMetrics mixin, so I chopped it out

### Tests
Added tests (runnable via gulp) and a jasmine testRunner.html file
had to hack the gulp task a little so that I could get browserify to pick up requires properly. We plan to migrate to webpack anyway, so will revisit that then
The tests are split into core and browser, with anything under core getting run in node (via gulp)
We're planning on plugging Jest in to get a fake DOM and then shoudl be able to make most tests run in browser OR in node, so we can have a watch that automatically reactifys, es6ifys, jshints, and runs tests

The tests so far are mostly on the keyboard nav side, but clearly lots of areas to add specs on for the main grid