It would've been nice if CSS customization allowed dotted lines (a
loaded topic)?
http://code.google.com/p/google-web-toolkit/issues/detail?id=543#c20
Pavel
I guess I just need to come up with a prototype.
Pavel
Emily Crutcher wrote:
> The primary purpose of the new FastTree is to be, well, fast. It's
> secondary purpose is to expose more tree behaviors to the user to
> create more interactive trees. All the styling is done via css style
> sheets to maximize what flexibility we have left.
>
> So to support enhancements such as dotted lines, we can add more
> behavior hooks, but could not add DOM changes which slow down the
> tree. Creating trees with lines is also not a high priority for me,
> but if someone else would like to work on it with those constraints
> understood, I'd be happy to lend a hand.
>
> Cheers,
>
> Emily
>
>
>
>
> On Jan 15, 2008 4:51 PM, Pavel <pav...@gmail.com
Hi Emily,
Nice work on the Fast Tree. It looks good and is responds quickly on all browsers. I was impressed by the speed with which a node with 500+ children expanded on IE6.
I have a few suggestions and questions about the behavior of the tree:
- Expanding and collapsing nodes causes the browser to scroll so that the highlighted node is in view. To reproduce this behavior, highlight and expand child0 in the lazy tree. Scroll down so that child0 is off the top of the screen and expand one of its children. The view snaps up so that child0 is at the top of the screen.
- Is it possible to prevent text selection when pressing on the '+' or '-' buttons? Rapidly opening and closing a node is sometimes interpreted as a double-click and highlights the node's text, which is a bit unexpected.
- Would it be possible to implement double-click to expand behavior on nodes? Trees on Windows and Mac have this behavior, and I think users are likely to expect it.
I noticed a few styling issues:
- Firefox puts a box around the selected tree item (see attached image). Can it be removed?
- The selection bar expands beyond the width of the tree in browsers using the W3C box-model.
-SamOn Jan 15, 2008 4:33 PM, Emily Crutcher <e...@google.com> wrote:
> Fast Tree is a new Tree API. It breaks the old Tree API in a couple of different ways, outlined below. It is 3-10 times faster then the old Tree as well.
>
> Wiki, with links to demo and live code:
> http://code.google.com/p/google-web-toolkit-incubator/wiki/FastTree
>
> Main changes:
>
>
> FastTreeItem no longer uses image widgets, uses css background images instead.
> TreeListeners functionality has been replaced with overridable methods from FastTreeItem such as onSelected(), ensureChildren(), and beforeOpen()
>
> Selection now highlights horizontally using a selection bar. Users can customize how the bar highlights their items.
> Added HasFastTreeItems interface for convenience when adding items to the tree or the tree items
> All styles delegated to CSS to allow user customization of tree.
>
> Uses StyleInjector library to provide default stylesheet for FastTree
>
>
> --
> "There are only 10 types of people in the world: Those who understand binary, and those who don't"
>
- Would it be possible to implement double-click to expand behavior on nodes? Trees on Windows and Mac have this behavior, and I think users are likely to expect it.
Can you elaborate a bit more on this one? I don't think I quite understand.
I attached a screenshot from Safari. The selection bar extends beyond
the edge of the tree (it's two pixels too wide). This also occurs in
Firefox, and I think will occur in Internet Explorer in standards mode
as well.
The width: 100% on the .selection-bar causes the content-area of the
selection bar to have the width of the FastTree. The border then
extends beyond the size of the FastTree.
The only solution I know of is to wrap the selection bar in another
div tag. You can then style them with something like:
.selection-bar-outer {
background: #e3e8f3 url('%selectionBar%') repeat-x;
font-size: 0;
position: absolute;
left: 0;
width: 100%;
}
.selection-bar-inner {
border: 1px solid black;
font-size: 0;
height: 100%;
}
I'm not a big fan of having to add another DOM element solely for
styling purposes, but I don't know of a better way. So much for CSS
allowing you to separate style from presentation. :-)
-Sam
What do you think about convergence and incompatibility with existing
widgets?
Although we the community deeply appreciate all the great work that
you have done, I think it would be better if you focused more on
improving and incorporating great ideas into the existing native
widgets of GWT instead of spawning a completely new branch for Trees,
along with the existing alternatives that we already have for 'em
(GWT, MyGWT, gwtext, UFace etc).
I feel sometimes we have lost the meaning of reuse, although we live
in an OO Componetized world!