adobe/brackets — pull request #1717 by jbalsas (2012-09-25 23:32:33+00:00)
Title: Statusbar for Brackets

Adds a bottom status bar in the content area to show general editor settings and other status indicators. This is inspired by this user story https://trello.com/card/2-status-bar-bottom/4f90a6d98f77505d7940ce88/337

**NOTES**

I'm creating this pull request because I'm not sure about the right process and maybe I'm going a little over my head here... I think it still needs some work and discussion if you'd want to add it, so maybe it would be best if it could be forked and polished to reach a better state before trying to merge it.

**INFORMATION**

As suggested in the card, the status bar sits at the bottom of the editor and shows the **line and column number**, **number of lines**, **mode** and **current tab setting** for the current focused editor.

**API**

exports.showBusyIndicator = showBusyIndicator;
exports.hideBusyIndicator = hideBusyIndicator;

These APIs are a possible solution (at least partial) for the story in this card https://trello.com/card/ui-for-long-running-operatons/4f90a6d98f77505d7940ce88/551. The status bar includes a *busy* indicator that any module can show or hide through these methods. Additionally, `showBusyIndicator` takes one optional parameter to set a busy cursor over Brackets until `hideBusyIndicator` is called.

In this pull request, the `Find in Files` module has been updated to show the busy indicator and cursor while waiting for the search operation to complete.

exports.addIndicator = addIndicator;
exports.updateIndicator = updateIndicator;

These APIs allow any module to add an indicator on the status bar and update it at any time.

`addIndicator` takes an `id` (module.id could be nice) and other optional parameters such as `indicator`, `visible`, `style`, `tooltip` and `command`.

`updateIndicator` takes the same parameters as the other except `indicator`. It allows to update the values with new ones to change the status indicator appearance and behavior.

- If a DOM element `indicator` is passed, it will be added to the status bar. Otherwise, an empty `span` will be used.
- The `visible` parameter sets the initial indicator visibility
- The `style` parameter indicates a class to style the indicator
- The `tooltip` parameter is set as the indicator `title` so that it appears as a tooltip when the mouse is over it
- The `command` parameter indicates a function to be called on click over the indicator. (It could be used to show/hide the JSLint errors panel decoupling this from the enable/disable action as outlined in https://groups.google.com/forum/?fromgroups=#!topic/brackets-dev/PqEbuhw7k6c

In this pull request, and just as a test for the API, the `JSLintUtils` module has been updated to add and update the indicator at the statusbar instead of at the toolbar. Also, the `UpdateNotification` module has been updated to show the gift icon as a status indicator.

**KNOWN ISSUES**

* The style for the status bar and the busy indicator are in serious need of a makeover :)
* The information fields were not fully working with inline editors, so I didn't take them into account for now. Is it possible that inline editors are not triggering the `cursorActivity` event?
* Indicator commands are not implemented waiting further discussion.
* The `addIndicator` and `updateIndicator` APIs could be improved for better flexibility.

Sorry for the long and booring post :)

PS: Although not yet finished, the status bar also comes in a Brackets Extension flavour https://github.com/jbalsas/brackets-statusbar-extension ;)