adobe/brackets — pull request #3943 by peterflynn (2013-05-21 19:07:45+00:00)
Title: Improved panel management - prevent resizing panels larger than available space

Fixes another part #2015 by maintaining panel max resize limits based on currently available slack space (i.e. space used by the editor area).

- PanelManager provides APIs to create panels below the editor area. JSLint
and Find in Files now use these APIs. (Find in Files panel UI is now moved out of main-view.html into a template).
- Move editor-holder ht calculations from EditorManager to PanelManager
- EditorManager listens to PanelManager for resize notifications. PanelManager
listens for window resize (moved from EditorManager) and for Resizer events
on all bottom panels. The old EditorManager.resizeEditor() API is still used
for edge cases such as status & search bar show/hide, extensions that add
fixed top panels, and extensions that don't use Resizer APIs to hide/show
panels.
- Since PanelManager is listening, Resizer no longer pings EditorManager
directly about show/hide/resize. Resizer emits events to notify PanelManager
about any panels it may have missed (legacy extensions that add panels via
Resizer instead of PanelManager).
- Add max-size support to Resizer. Change Resizer min/max limits to operate in terms of panel outer height.
- PanelManager updates all bottom panels' max sizes when anything is resized/shown/hidden.

This also enables a cleaner fix to #3371 -- see pull #3931 which is based on this branch.