-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
Add/Update Indicator API in StatusBar JSLintUtils indicator UpdateNotificatino indicator Find in files shows busyIndicator
@jbalsas -- this is totally sweet. We literally just got out of our planning meetings for the next sprint, and one of the tasks we added was for a status bar :) We mainly wanted to add it to support adding a simple switcher for spaces vs. tabs, so what you've got could be a great start. We'll try to do a closer review over the next few days and suggest improvements if any. Thanks! |
BTW, you can see a mockup that @GarthDB made for the status bar in the Extension UI Guidelines doc on the wiki: https://github.com/adobe/brackets/wiki/Extension-UI-Guidelines (search for the "Status Bar" section). Aside from the internal layout/positioning of the items in the status bar, the main differences are in the background color, font size and vertical padding. Probably worth tweaking those simple visual issues first--the internal layout stuff is probably a bigger question that's worth some discussion. |
I'll try and take a look at the request and your current UI sometime tonight. Sent from my iPhone On Sep 25, 2012, at 4:56 PM, Narciso Jaramillo notifications@github.com wrote:
|
The busy indicator is cool too. @GarthDB, do we have artwork for a spinner handy? (SVG preferably so we can scale it.) We could add a simple animation to rotate it, and start/stop it when we show/hide it. |
There is a design done for reflow. I'll look into it. Sent from my iPhone On Sep 25, 2012, at 6:19 PM, Narciso Jaramillo notifications@github.com wrote:
|
|
||
function _updateCursorInfo() { | ||
var cursor = fullEditor.getCursorPos(), | ||
cursorInfo = "Line " + (cursor.line + 1) + ", " + "Column " + (cursor.ch + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Externalize string, Line {0}, Column {1}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like the cursor movement/statusbar updating feels a little laggy on my 2012 macbook air. Especially when scrolling down by holding the down arrow. I tried using webkitRequestAnimationFrame but that only helped slightly. Are you seeing any issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me... I'm on an old Macbook Pro (2007 I think...), with Mac OS X 10.7.4.
I've noticed it lags when I have some other panels such 'Find in Files' with many results opened, but then so does everything else...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it has something to do with https://github.com/adobe/brackets-shell/issues/61 ?
Reviewing |
$(fullEditor).off("cursorActivity", _updateCursorInfo); | ||
} | ||
|
||
fullEditor = EditorManager.getCurrentFullEditor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably has something to do with #1257, but we should put a comment here about supporting inline editors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw the note in the description about supporting inline editors. It's still worth putting a comment here in the code as a reminder.
Initial review complete. Hopefully this is mostly just cleanup and not a ton of refactoring. Our goal is to merge this in as soon as possible to unblock the tabs/spaces story https://trello.com/c/exOQhrGw. If you're too busy to take on these code review changes, we can also help. Thanks for the great contribution. The timing couldn't be better. |
I'm attending tomorrows hackaton in London. Hopefully I'll be able to go through all the review changes there ;) |
@jbalsas I'm not going to be in London, but please introduce yourself to the team that's there. Maybe @peterflynn, @njx or @gruehle will pick up the review or I can finish it tomorrow as well. |
Looks great! Thanks for the contribution. Merging. |
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
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 untilhideBusyIndicator
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.These APIs allow any module to add an indicator on the status bar and update it at any time.
addIndicator
takes anid
(module.id could be nice) and other optional parameters such asindicator
,visible
,style
,tooltip
andcommand
.updateIndicator
takes the same parameters as the other exceptindicator
. It allows to update the values with new ones to change the status indicator appearance and behavior.indicator
is passed, it will be added to the status bar. Otherwise, an emptyspan
will be used.visible
parameter sets the initial indicator visibilitystyle
parameter indicates a class to style the indicatortooltip
parameter is set as the indicatortitle
so that it appears as a tooltip when the mouse is over itcommand
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/PqEbuhw7k6cIn 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, theUpdateNotification
module has been updated to show the gift icon as a status indicator.KNOWN ISSUES
cursorActivity
event?addIndicator
andupdateIndicator
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 ;)