praekelt/sapphire — pull request #74 by justinvdm (2014-10-15 14:33:12+00:00)
Title: Remove dashboard component

Sapphire's dashboard component draws its widgets in a grid. The grid layout is being done entirely in javascript, and is pretty limited.

Probably the biggest limitation is the fact that it doesn't handle different screen sizes in any way. Handling this isn't an easy problem to solve, and solving this using javascript feels like reinventing the wheel, since layout is something suited to css.

A simpler way forward would be to have sapphire only handle the drawing of widgets, and leave the layout of the widgets up to whatever is using sapphire. There are grid systems out there already that solve how to lay things out in a grid using css (e.g. [bootstrap's grid system](http://getbootstrap.com/css/#grid), the [960 grid system](http://960.gs/demo.html)).

For project specific dashboard pages (for eg, the NDOH dashboard), one of those grid systems would be used along with sapphire.

For vumi-go dashboards, one possible way forward would be to have a set of layout types people could use (each corresponding to a different template or something). Exactly what we do for vumi-go dashboards in the long term should depend on first finding what users want to see in a dashboard and how they would like to configure it.

The plan is to add a simple example of how to add sapphire to a bootstrap grid.

Ideally, this change should be done now, before sapphire is used on projects and we can't change anything. The change should be pretty small since its pretty much just removing code.

(This is from a discussion I had with @SteveBarnett and @hodgestar).