Friday, April 29, 2005

X marks the tab...

So while I'm waiting for the latest new bits of Delphi goodness to be assembled into some machine readable goop... I figured I'd take a few moments to spew a few thoughts...

You know those little “X”s on the editor tabs in Delphi 2005?  The ones that you either absolutely revile as the spawn of the devil, or on the opposite side, they're the Messiah's second coming.  Quite frankly, I'm someplace in the middle... well maybe more toward the Messiah side... When we were considering putting them into Delphi (ie. the Galileo IDE), we looked at how these little images of controversy were handled in other environments.  The first such environment, which was also the most logical, that we looked at was JBuilder.  So we fired up JBuilder to do some research (such as it was).  After playing around with them for a while, I found some usability issues with them, but overall Corbin and I really like the idea. (an aside: the Eclipse IDE has a similar feature as well) Here's a few that I found...

  1. It is easy to accidently click the “X” and close the tab.
  2. They increase the width of the tab, thus decreasing the total number of tabs visible (JBuilder also has a glyph next to the “X“ that shows the content type).
  3. If you want to close many tabs in succession and since the tabs were varying widths, you constantly have to shift the cursor to the new location of the “X“ on the next tab.

The first item is probably the #1 complaint among the “spawn of the devil” crowd.  I, too, sometimes have found myself accidently clicking that little “X” when I don't fully pay attention to what I'm doing.  I mean, I'm deep in the middle of a bug fix or some sort of feature work and I want to click over to some other tab, and bam!  I just closed the tab.  So now I just Alt-F,R,5... That's File|Reopen|5. .  I've just gotten used to quickly doing that little dance.  OK.. so that's the first problem.

The next one is... well... really hard to quantify.  If you hate the “X”, then #2 is probably one of your supporting arguments for removing them.  That's fine, but I also think it is a data point that also can stand on its own.  Screen real-estate is a finite resource and needs to be carefully parceled out.  Now that doesn't mean that we create butt-ugly UIs under the pretense of the almighty screen real-estate.  It means that there needs to be a balance.  I often hear folks, especially among the software engineering illuminati, “We don't need all that eye-candy!“  Riiiight...  If that were the case then we'd all be driving Gremlins, Pacers, or Pintos.  That's why I have a Monet print and an actual oil reproduction of a Monet painted by my mother hanging in my office (both from the Water Lilies series, for which Monet is very famous.  And yes, Monet is one of my favorite classical artists).  Right next to the cool 4ft (120cm) wide poster of an F-15E in flight...  All of it is “eye-candy.“  Of course these posters all have their own stories themselves, which I'll save for another blog entry.

The last item is somewhat subtle.  One of my first thoughts when I saw the “X” on the tabs, was “That's cool! I can now quickly close a lot of files without a lot of clicking or mouse movement.”  Well.. not quite.  So you would close the tab, and the tab to the left would slide over, but that tab is a different width that the one just closed, so now the mouse cursor isn't directly under the “X” and you have to move it to the left or the right and click again.  Grrr...  Of course, if you have a habit of double-clicking, you'd probably appreciate that the “X” didn't appear under the mouse cursor.... sometimes.

So with all these negatives, why the blazes did you put that in the product? First of all, it is just so dang useful and convenient.  Also, we solved the #3 problem by having the tab to the right slide over, which would always put the “X” right back under the mouse cursor.  It's also kinda like chocolate.. you know that too much of it isn't good for you, but in moderation it's pretty tasty.

So, now that we've shipped a couple of products with the “X” and have received some feedback from all the various factions out there. You know, the “spawn of the devil” folks and the “Messiah's second coming” folks.  So we're considering a bit of a change.  What if the “X” was at a fixed location?  Say it was all the way over to the right side of the tabs?

That would solve the all the complaints I listed above.  However it would introduce another problem.  Since there is now only one “X”, you can only close the active tab.  Which was one nice thing about the “X” on the tab; you could close an inactive tab by clicking on the “X” directly.  I suppose we're at a point where a descision needs to be made.  Right now, we're internally using this change for the next release of Delphi to see how folks like it.  So far the response has been positive... well OK, not all positive since there are those that “want their 'X' back!”  Now before you suggest it, no, I'm not going to make this optional.  So we have to weigh the advantages and the disadvatages.  So far, I'm inclined to think this is a reasonable compromise between both camps.  Be warned, however, please keep your comments to the point and well thought out.  Any comment I think is disrespectful and rude, I'll delete.  Think critically about the problem, and consider each side regardless of your personal opinion.  Yes, ultimately, the original decision was based on our (the developers and the overall team's) personal preference, and it still is.  Yet, feedback is still key in how we form our preferences and opinions.  Being, ourselves, developers we like to think of ourselves as advocates for the customers.  Like all groups, there are the radical fringes, but you have to take the bad with the good.. and luckily, for the Delphi community, it is mostly good.  It makes our job more enjoyable and satisfying.

With that, have fun... ;-)..  And, hey, if this works out, I might try and address the “my glyphs are overlapping in the editor gutter!” (OK, Nick?) issues...  Talk about a field full of landmines...

51 comments:

  1. I'm not fanatical about it, but I like the X on the tab.


    As I trace through code, I usually wind up with a bunch of different files open. When I clean up, I pick and choose which ones to close. Since these aren't always grouped together, it's more convenient to close them with a single click instead of two clicks in separate places (one to select a tab and another on the single X).

    ReplyDelete
  2. Oh, and I'm looking forward to that "icons obscuring line numbers" discussion. I have stronger feelings about that one. :)

    ReplyDelete
  3. Oh yeah! Update #3 that I did to the Delphi IDE tabs. I had almost forgotten that I did a lot of cool development before my departure. I'm guessing that it is finally making it into internal builds :).


    I prefer the X on the right side - it takes up less screen real estate and lets you use that prior location for other things. Of course, I'm not biased :)


    --corbin

    ReplyDelete
  4. For the record, I don't think Corbin is referring to the upcoming Delphi Update #3...

    ReplyDelete
  5. IDE must be stable!!! That is the only real thing we need!


    I donn't really care where X is located.


    By the way - did you ever thinked, that it may be configurable? Left or right might be choosen by user.

    ReplyDelete
  6. Yeah, sorry for the confusion! This will have been the 3rd update on the tabs: First version was the "standard win32" TabSet. Second version was introduced in C#Builder/D8/D2005 with the X on the tabs. Third version is currently internal, with the X moved to the right.

    ReplyDelete
  7. How about as a compromise, having the new functionality as you outlined above, but with the added ability to close tabs with a middle mouse button click?


    FireFox uses this middle-click approach very successfully IMHO, and it isn't restricted to only 3 button mice. Depressing a scrollwheel on a Microsoft Intellimouse (or whatever the dang things are called) can act as a middle-click action.

    ReplyDelete
  8. Why not just keep the X hidden until someone holds down the CRTL key and then make them show up?


    -- Robert

    ReplyDelete
  9. Hi Allen.


    Why don't you just put a clickable X at the rightmost side of the editor and it will close the currently open tab?


    Simple, effective, with no counter-indications.


    For those who don't want it, you could just make it configurable from the editor

    options(enabled/disabled).


    Cheers,


    Andrew

    ReplyDelete
  10. Andrea,

    That is exactly what we're doing in some of the internal builds. And, I agree... except for the optional part... it is far enough out of the way and doesn't take any more real-estate than nessesary.

    ReplyDelete
  11. Allen,


    Please don't take me wrong on this - but you should know better than me that there're a few

    "zealots" around and they might complain about the fact that it could "accidentally" be pressed anyway.


    Yes, I know it's non-sense, but there're quite a bit of non-senses already on the groups and I wouldn't be surprised by such a response... other than that, I think you're right.


    Cheers,


    Andrew

    ReplyDelete
  12. Well... from my point of view no X is needed at all... just by double clicking the tab you close it and done. You may put a Top right X to close ALL tabs...



    Albert

    ReplyDelete
  13. Albert,


    While I do agree to an extent to what you're saying, I'm not fully agreeing.


    Why? Simple:


    1) Double-click doesn't usually issue a close, but an open

    2) It wouldn't solve the original problem(factions)

    3) It would generate confusion, and I kind of already see people double-clicking on Delphi 6 code editor tabs to make them close :-)


    Cheers,


    Andrew

    ReplyDelete
  14. Hi Allen,


    I certainly like the idea about one X on the far right side of the screen. Although having the option to quickly click through some X's to close down some tabs is nice, it does take some unnecessary screen real-estate away.


    And when I have to close a lot of tabs, it means I have to close all but one, 99% of the time. So if there's only one X at the far right side, you just have to slam your mouse to the right, make a small correction and click away. Think of people with trackballs or other weird pointing devices on laptops trying to chase all those X's as the tabs are closing.

    ReplyDelete
  15. Personally, I'd like to see double clicking on a tab close it. There is an addin for Firefox that does just that and it's very convenient, has _no_ screen real estate impact and still allows you to close whichever tab you like. Here is more info regarding the addin for Firefox http://twanno.mozdev.org/#ctodc

    ReplyDelete
  16. @Steve:


    While double clicking doesn't have any impact on the screen real estate, it would certainly cause confusion in my oppinion, since that behaviour just doesn't correlate with how Windows based (and many others im sure) interfaces behave since the double-click was introduced. Deep inside my head there's this connection between double clicking and opening things up, because well, thats what double clicking does.


    Imagine all GUIs mixing this behaviour - sometimes double clicking would open something up, on some occasions it would close something. Confusing.

    ReplyDelete
  17. I like the X on the right hand side. It's clear, small and works just fine.


    I think the double-click to close a tab is counter intuitive. I can imagine devs double clicking by accident or by habit and thinking that Delphi closed their file by mistake. The last thing Delphi 2005 needs right now is any appearance of instability.


    You've explicitly stated that you don't want to make these choices optional, however have yet to say why you don't want to make them optional. Can you please elaborate? ISTM, that whenever you have a divided group of users options are what makes sense.


    For example, there are some that like docked windows and some that like floating. Delphi 2005 provides an option for both. So why not provide an option regarding the tab X's? It seems like the most appropriate thing to do in this case.




    ReplyDelete
  18. I like the "X" on the tabs and an "X" to the right. Also, only close tabs that are active. i.e. if "X" is clicked on a tab that is not active it should make the tab active instead of closing that tab. This will solve Problem #1. Problem #2 and #3 have already been solved by the Delphi 2005 implementation.


    I also like Steve Trefethen's idea of double-clicking a tab to close it. If you implement this you can make any other changes you like. ;-) i.e. if the "X" to the right exists I'll be happy because I'll still be able to close the tab I want by double-clicking. Actually, even a middle-click would be fine.


    Cheers,

    Kevin.

    ReplyDelete
  19. I will miss the tabs. Not only do they allow you to close each tab quickly, in any order, they also provide valuable feedback about the "saved" state of a file.


    The X at the right would IMO be a step back to what older MDI editors do. I like Robert Kozak's idea of only showing them when you press Ctrl, although the visual feedback about the "saved" state is missing then. But that could be done differently, perhaps with a coloured edge somewhere on the tab.


    I saw a BDNtv demo with those kind of tabs, and I guess that is what you have now. Note that he icon takes up just as much screen space, so the wider tab is obviously not your concern. <eg>


    To avoid pressing them accidently, you could make them double-click, or like Robert said: Ctrl-Click or Shift-Click items instead of directly clickable. Anyone wanting to close a lot of tabs will simply have to hold that key down.


    And that (Ctrl or direct) could IMo be an easy to implement option.


    WRT the items in the gutter: give each of the categories their own "lane", and only if the gutter is narrow, let these lanes overlap. IOW, make the overlap dependent on the width of the gutter, which can already be set, AFAIK.


    ReplyDelete
  20. I don't care about those silly X's.


    Just get the damn blue balls of my line numbers!


    ;-)


    Nick

    ReplyDelete
  21. Hi Nick!... ;-)

    ReplyDelete
  22. As some have mentioned, you should look to Firefox for some ideas. I use Firefox with All In Gestures and Tab Mix. The latter controls when and where the X appears on the FF tabs. So why do I mention the former?


    Would Borland like to add to its portfolio of innovations? :-) Mouse gestures for the IDE editor. Here are some ideas for gestures.


    Down-Right, close current tab.

    Down-Left, minimize Delphi.

    Up-Right, go to tab on right.

    Up-Left, go to tab on left.

    Up-Down, reload file.

    Straight line Left or Right, toggle between code and design.

    Straight line up, show File/New/Other dialog.

    Straight line down, open a new editor window.

    Draw "n", go to interface.

    Draw "m", go to implementation.

    Draw "s", show and focus Inspector.

    Draw "p", show and focus Project Manager.

    Draw "c", show and focus Component Palette.


    Use the All In One Gestures plug-in, and you'll see what I mean. It's one of those things the more use it, the more you love it.

    ReplyDelete
  23. Allen. I have a different suggestion.


    Right now you have to move the mouse a fair bit to click the X.


    I suggest that the X is rendered on the active tab only. This will greatly reduce the risk of clicking it by mistake, since you seldom select the active tab. And it will save real estate.


    And if layout is done so that the X turns up at the same place as the glyph is on an unselected tab, you could close by a slow doubleclick on the glyph, with no move at all.




    ReplyDelete
  24. I really don't understand why it can't be optional to have the X at all. In my humble experience, anytime half my users love something and the other half hate it, I always make it an option and then everyone is happy. I know it adds x new possiblities for QA to test, but when it's 50/50 it is the only way you can get close to 100% satisfaction...

    ReplyDelete
  25. Screen Real Estate:

    * Well the tabs in the C++ Demo had an image on them. An image is wider than the actual X is the new tabs would require more space.

    * Also with the addition of the X and the Drop down button at the end of the tabset there is even less room for tabs than previous.

    * Where does the scroller appear when there are too many tabs on the tabset to show? Given the GUI it looks like the scrollers will also be wider and reduce space even further.

    * On some resolution the X will be a long way away from the tab I want to close.


    Double clicking tab should close it?

    * NO. Double clicking on a tab should ZOOM the code editor to full screen. You don't double click on the caption of a form to close it - you do so to maximize it.


    Accidently clicking on the X

    * If people can't control where they click the mouse on a tab then perhaps they shouldn't have a mouse clicking license


    It's disappointing that this can't be made optional either way.

    ReplyDelete
  26. Well...

    I suggested this with the double click just because as Steve Trefethen mentioned I got use to it with FireFox. Believe me, every day at least once I double click a tab at my IDE trying to close the unit.. with of course.. no efford :-).

    Now I am using the Avant Browser, who does pretty the same.


    To Andrea Raimondi.

    I don't think it would confuse anyone.. it's just as you have it you do it... the point is to propose an idea. :-).

    ReplyDelete
  27. Albert,


    I'm not sure this post will pass through Allen's moderation, anyway... it seems that not always "propose ideas" is a well seen things in Borland's neighbourhood :-)


    Coming to the suggestion: I don't like double click to close as a concept, because when you double click you usually expect something to *open* in Windows. Using it to close, would be much like Apple's trash can usage to eject a CD.


    Cheers,


    Andrew

    ReplyDelete
  28. I've been a bit too busy dealing with all the IDE defects to even notice or worry about these tabs. How about solving these defects first and then worrying about look and feel?

    ReplyDelete
  29. Allen,


    For me: no X on the tab, and double click (ala FireFox, thanks Steve) to close. And an option for "the classic way".


    To Jeremy: I'm quite handy with the mouse (I play a lot of FPS games and that means you need accuracy with the mouse) but I still find myself clicking too often on the X. Oracle's JDeveloper has the same problem (http://www.rare-it.com/b2e/blogs/switchbl8/blog.php/2005/03/24/jdeveloper_10_1_3_p_review): I hate it. VS.NET and FireFox have the X on the right, and that's where it should be. Windows don't have the closing X floating around, since that would make you have to look for the X. Same with tabs. Same place all the time.


    ReplyDelete
  30. That was the first thing I changed when i got D2005, after a few misclicks i got rid of them If i want to close the active tab i use Ctrl+F4 or RightClick on the tab and choose Close Page :)

    ReplyDelete
  31. Jan Norden's idea is brilliant.

    ReplyDelete
  32. Robert McClintockMay 1, 2005 at 9:43 AM

    My vote (which matches several others) is to double-click on the tab to close it. I use this with Firefox and it is very natural. No wasted real estate, no accidental closing of a tab.

    ReplyDelete
  33. JBuilder supports both horizontal and vertical tabs. With a vertical orientation, the issue of varying tab widths in your item 3 goes away.


    Note that JBuilder uses a "broken X" to indicate file modified. It also provides a base for the state decorations (e.g. readonly, modified by another in your VCS). So it is more than just a way to close the file.


    Double-clicking on a tab toggles the maximize/restore state of the file in JBuilder (similar to what Windows does when you double-click in a window titlebar). I think using it to close the file would run counter to existing UI standards.

    ReplyDelete
  34. Kristofer SkaugMay 1, 2005 at 8:16 PM

    You said:

    > First of all, it is just so dang

    > useful and convenient


    I've used right-click ('Close page') and/or Ctrl+F4 for this purpose for years. Trying to locate a moving target, about 4x4 pixels in size, could never be faster or more convenient than Ctrl+F4.


    I agreee with Dennis, Jan Norden's suggestion (x only on the active tab) would be a big improvement in and of itself, to overcome some of the usability issues.

    ReplyDelete
  35. Ryan VanIderstineMay 1, 2005 at 11:50 PM

    I prefer Robert's idea of hiding the X unless the Control key is pressed. It feels more in line with the keyboard only Ctrl+F4 that is used to close the tab normally.


    The only thing that would be lost would be the ability to see which tabs have not been saved. Making some change to how the text is rendered would solve that lost benefit. Perhaps italics/red, etc.


    I don't really like the idea of the X in a fixed location on the right. It is simply too restrictive as compared to the current behaviour.

    ReplyDelete
  36. I use firefox and like how it handles this problem on my system. (different then the firefox user above it seems).

    On mine, (winxp) if you want to do something with a tab, you right click on it. It comes up with a little menu,

    &New Tab

    --------

    R&eload Tab

    Reload &All Tabs

    Cl&ose Other Tabs

    -----------------

    &Close Tab


    This solves your accidental clicking problem, your realestate problem and the closing of multiple tabs as well.


    kdevelop uses something similar as well.


    ReplyDelete
  37. I personally like the X on the tab, but I believe putting the X where you suggest, and they making the tabs closable with a middle mouse button click (like Firefox) is a great alternative.


    Firefox and Opera both support the middle mouse click to close functionality, although Opera also has the X's (which I have accidently clicked since I have SO MANY tabs open.)


    While you are at it, adding a "close all but current option", and "close all but current project option" would be great.

    ReplyDelete
  38. I think this question is not worth so wide & hot debates...


    Make it configurable pro user, that's it.


    When it comes down to a preference, let a user decide.

    ReplyDelete
  39. If the X is removed from the tabs, I like David's idea of using the middle button (or mouse wheel click). This would give me the ability to close any tab or tabs (in any order) with a single click instead of having to first select a tab and then close it with a keystroke or by moving my mouse to the single X on the right.


    Of course, I'd still want to be able to tell at a glance which files have been changed.


    Double clicking to close a tab seems counter-intuitive.

    ReplyDelete
  40. Please keep the X on the Tabs. But with the added twist suggested by Robert in that only make them visible when the Ctrl key is held down. That is a brilliant compromise. It solves all of the problems. No accidental clicking (OR double-clicking), screen real-estate maximized. You can still add the X to the far right (like VS.NET?) as that shouldn't hurt and can only help. And be sure to leave the right-click "Close Tab" menu item available too. You ought to know better than to even entertain the notion of double-clicking to close... my company standard issue mouse will cause grief to no end if that is ever done.

    ReplyDelete
  41. I like it, I'm voting for X all the way to the right as long as you can still get the "Close Page" from the right-click menu on the tab. I work in a feast or famine style, so either I only have 1 or 2 editor windows open and I want to close the active one or I have about 10 open and I'm just going to do a Close All and reopen just the ones I need.

    ReplyDelete
  42. I like the X on the tabs, but I don't like the X on the right. I generally use the X in other IDEs to close tabs that are not related to the file I'm currently editing. If I have to make a tab active to close it, it betrays the way I use the feature.


    ReplyDelete
  43. I agree with Chris on this one: the only reason I ever use the 'x' on the tab is to close inactive windows. If I'm closing the active window, i'll use a shortcut. :)

    ReplyDelete
  44. I'd prefer the right X. I personally always close current tab pressing Ctrl+F4 with classic editor layout. The 'x' on each tab is really disturbing. I spend sometime daily with JBuilder and my eyes get confused when trying to find an specific open file name from among the many opened colored tabs and 'x's.


    It'll be maybe more useful to remove the tabs-paradigm completely and have a live "structure" kind of view with alpha ordered list of opened sources. (ie: docked Ctrl+F12)


    ReplyDelete
  45. OK so I'm pretty late to jump onto the bandwagon.


    I pretty much like the idea of a close button at the far right side instead of on each individual tab. *and* the idea of ctrl + clicking to close non-active tabs.


    One other thing I'd like to suggest (or was it already mentioned?) about the tabs is, could the previously active tab be made active when I close my current tab?


    To Kyle A. Miller:

    If you are into mouse gestures, I would like to suggest checking out StrokeIt at http://www.tcbmi.com/strokeit


    It's a nice little utility with global mouse gestures support and also the ability to customise mouse gestures (or disable them) for specific applications as well. Works in Mozilla too ;-)

    ReplyDelete
  46. To add to Jan's idea; render X on active tab and on the tab under the mouse cursor. That will make things a little jumpy, but save screen estate + allow for X-closing non-active tabs.

    ReplyDelete
  47. Visual Studio has a single X on the right and I always find myself saying "Why don't they a X on each tab like D2005"

    ReplyDelete
  48. Henning SwibodaMay 6, 2005 at 9:15 AM

    I've would like to se if there are any changes sins last recompile. When I work with web applications I often only hit ctrl+F9 and switch to the browser and try if the changes did work. But often I'm ending up with hitting ctrl+F9 to or three times because I don't know if I have changed any source sins last recompile.

    ReplyDelete
  49. I like the X on the right idea. Though it doesn't make much sense to me to not give a simple option for showing the X on tabs as well since a lot of people like it. I also like the idea of an additional option to hold Ctrl+Alt or something similar and click on the tabs to close them. I think a choice among these options would make almost everybody happy.


    I would probably use all 3 of these methods depending on what I'm doing and whichever is quickest at the time. Things like this make an IDE much more useful and is much better then simply forcing everybody to have it one way and see how much they complain, IMO.

    ReplyDelete
  50. X on the right is fine. It works very well in FireFox, and I use something similar in my own software.


    As for the double-click-to-close suggestion: no, no, no. It's misusing a metaphor, which, while some may find it nice, makes the software less intuitive and therefore less user friendly. Double clicks are for activating something, not for closing something.

    ReplyDelete
  51. It is allright to have a single "X" to the right and the option to close any non active tab trough a context menu (I like Firefox behavior a lot more than Visual Studio's, which will bring a tab to the foreground when you right-click on it).

    Don't be shy to copy other people's good UI tricks ;)

    ReplyDelete

Please keep your comments related to the post on which you are commenting. No spam, personal attacks, or general nastiness. I will be watching and will delete comments I find irrelevant, offensive and unnecessary.