atom/atom — pull request #3837 by benogle (2014-10-15 01:05:25+00:00)
Title: Add panel API

The implementation of #3680:

```coffee
atom.workspace.addViewProvider
modelClass: ProjectBrowser
viewClass: ProjectBrowserElement
```

and

```coffee
panel = atom.workspace.addLeftPanel(item: new ProjectBrowser)
panel.hide() # Hide the panel
panel.show() # Show the panel
atom.workspace.addRightPanel(panel) # Move the panel to the right
panel.destroy() # Remove the panel entirely
```

Some notes
* Right now we have `prepend` and `append` api methods for each panel. This is basically a priority system. I want to add an attribute `priority` to the custom element and . Status bar would have a priority of 0, so always be at the bottom.
* I dont want to use classes, I want to use attributes. Classes might clash with some other selector. Attributes would be `orientation` and `priority`.
* I dont really like the panels naked in the axis elements. I would rather they had a parent element that indicated the orientation. Then adding and dealing with priority seems much easier with a parent element.

@nathansobo Most of the testing logic will be in the workspace view tests. Would you rather have it tested in it's own spec class? I think adding a `panel-container` element with a bit of logic for adding and managing panel priority would be a nice way to break the tests away from the workspaceView tests.

TODO

* [x] Create `Panel` model
* [x] Create `PanelElement` custom element
* [x] Get basic panel addition working
* [ ] Implement priority system
* [ ] addLeftPanel()
* [ ] addRightPanel()
* [ ] addTopPanel()
* [ ] addBottomPanel()
* [ ] Tinker with a package using this api (status bar)
* [ ] Deprecate the old stuff

Closes #3680