SVN Breadcrumb Bar – feedback from the comments
October 4th, 2007 | 9 Comments »Following the comments from the previous entry that introduced a Swing breadcrumb bar component that allows browsing local and remote SVN repositories, the latest 2.1dev drop of Flamingo has the following new features:
- Kamil and Danno pointed out that the network-related tasks (such as connecting to an SVN repository and fetching folder contents) shouldn’t be done on the EDT. I guess this is what happens when one pays too much attention to pushing the pixels :) The latest drop uses the JDK 5.0-compliant version of
SwingWorkerand offloads all relevant tasks off the EDT. The end result is that all breadcrumb bar core implementations (including the local file system browser) should be much more responsive and without any UI freezes. - AC suggested that i should provide an adapter to
TreeModelinterface. Theorg.jvnet.flamingo.bcb.core.BreadcrumbTreeAdapterSelectordoes just that, allowing wrapping an existingJTreeorTreeModelwith minimal additional application logic. The only additional logic you need to provide stems from my current reluctance to rely on the existing tree cell renderers, especially when a custom renderer doesn’t extend aJLabel. There are three constructors in this class, and you can look attest.bcb.JTreeAdapterBreadCrumbTestandtest.bcb.TreeModelAdapterBreadCrumbTestto see how easy it is to wrap and adapt an existing tree or tree model. - Eugene was confused by the proximity of the SVN repository selection combobox and the breadcrumb bar itself in the screenshots. This prompted me to write an experimental
org.jvnet.flamingo.bcb.core.BreadcrumbMultiSvnSelectorclass. Its root selector allows selecting an SVN repository, and all the other selectors browse through the selected repository. There have been some synchronization issues, since everything is done off EDT in separateSwingWorkertasks; these have been hopefully addressed. You can play with this component or thetest.bcb.MultiSvnBreadCrumbTesttest application and let me know if you run in some deadlocks / synchronization / inconsistency issues.
Thanks to everybody for your insightful comments. Hope you like the new version better. Here is the link to the WebStart SVN browser application once again (this time without hogging EDT):
For more thoughts from the original creator of Swing breadcrumb bar, Rick Jelliffe, click here.
Update based on the comments: the latest version of Flamingo has the following fixes
- Immediately showing selected element with ellipses (…) to indicate that the choices are loading
- Not showing the choices selector when there are no choices
- Fix on pressing the choices selector arrow when popup is showing
Thanks, Eugene and Matt for valuable feedback; it is much appreciated. You’re welcome to run the WebStart application and see if it behaves in a more user-friendly way.
Related posts:
- Swing Breadcrumb Bar for browsing remote SVN repositories Early last year, i wrote about an outside contribution to the Flamingo component suite. Back...
- Flamingo component suite 3.0 – breadcrumb bar The breadcrumb bar component from the Flamingo component suite has been mentioned a few times...
- Comboboxes in Substance 6.0 – feedback from Matt Nathan I believe there are two kinds of feedback – one of them is useful, and...
Nice, but UI is not reacting to the choices from drop down bars fast enough. Previous selection (down to the hierarchy) need to be dropped immediately and it should show some indication that data is being fetched for new selection (i.e. show “reading…” or maybe even animated progress indication.
Hi Kirill,
I have a breadcrumb type control in one of my apps, I did try using the substance one initially but in those days (10 months ago) it didn’t work quite how I wanted it to – ironically I wanted to pass it a treemodel ! Anyway, one of the things my breadcrumb supports is that if any of the items in the drop down are containers then I create a sub menu and the user can then browse into that. It ends up giving you a kind of horizontal treeview control that doesn’t take up much space. I will try and take a screen shot and mail it to you if you are interested ? I may have a go at trying to replace my breadcrumb with the substance one because yours does have a lot of features that I like (the up/down scrollers being one thing).
Rob
Looks good though I agree with Eugene that it should give some indication that something is happening when you select an option. A possible idea is that the drop down for the item that is loading shows the waiting animation until the contents can be displayed, I think this is what Vista does but can’t be sure as I haven’t used it for a while.
A couple of other small points that I thought could improve it a bit.
1) Add a pressed state to the arrow and folder buttons. This is in keeping with what Vista does and also should give the user feedback that pressing a button actually does something. Also a possible bug which could become redundant if the pressed state is implemented: If you press the arrow while the drop-down menu is showing the folder bg disappears.
2) Don’t display an arrow if there are no folders to choose from (i.e. the drop down would be empty.)
Also I’m not sure if this is a bug with the breadcrumb bar or the demo app but I was unable to reduce the width of the window. Resize the window horizontally to make it bigger then try to make it smaller again, it just wont do it.
Eugene, Matt
Many thanks for testing the component and providing the feedback. I’ve updated the entry, adding a section that addresses some of the points that you have raised. I will look into the other issues (resizing, pressed state) in the next few days.
Thanks
Kirill
Rob,
I understand what you’re doing with your implementation. However, this is the first time i hear about a breadcrumb bar that has multi-level drop-down selection. In addition, it might not scale well when it takes some time to fetch the choices. For example, it takes about 1-2 seconds to fetch contents of a folder in a remote SVN repository. Now imagine scrolling through the popup list and seeing “loading” messages on each selection.
Thanks
Kirill
Very nice idea!
It flickers when I move the UI across the screen, but that could be my system, too.
How about a right-click menu “Open with …” on the file list?
Good job so far!
Sakuraba – thanks for the suggestion. You can now right-click on a file in the file list and select “Show file contents”. It uses the official
getLeafContentAPI that every breadcrumb bar callback provides. I forgot to mention that method in the entries.Thanks
Kirill
Those improvements look great, though just as a thought could you change the ‘…’ to a waiting animation; maybe a spinning star or even just progressive dots (‘.’ -> ‘..’ -> ‘…’ -> ‘.’ etc).
I did find a small bug which I think could be in Substance itself. I get flickering of the scrollbar thumbs in the content viewer and the resize pointer remains enabled when not over the content under certain conditions.
To reproduce:
1. click the webstart link
2. choose KDE -> KDE -> kde-common (though I dont think this matters)
3. right click generate-xdeltas.sh and Show file contents
4. click in the vertical scroll bars track near the bottom and keep your mouse pressed.
5. drag your mouse into and out of the thumb both horizontally and vertically in a random manner.
After this (and only sometimes) when you resize the window from the corner the pointer remains as a resize pointer, the thumb will flicker when being dragged or when you click on the track and sometimes the thumb will remain in an alternate state (i.e. will be pressed when not over and not over when hovered).
Matt,
Thanks for the comments. I have thought about animating the load, and it is on the list of enhancements. The scroll bar issue is a known one in Substance and will be fixed before version 4.1 is released. The resize icon is inherited from the core delegates and has been addressed before. I’ll look into this to see why it is still happening.
Kirill