Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 141690

Summary: [Graphics] Improve Look and Feel of FilteredTree
Product: [Eclipse Project] Platform Reporter: Benjamin Pasero <bpasero>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P5 CC: andre_weinand, bokowski, daniel_megert, eclipse, Kevin_McGuire, konstantin, kpeter, markus.kell.r, martinae, mik.kersten, Mike_Wilson, remy.suen
Version: 3.2Keywords: helpwanted
Target Milestone: 3.5 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 128536, 183581    
Bug Blocks:    
Attachments:
Description Flags
Version as used in RSSOwl 1
none
Version as used in RSSOwl 2 (initial)
none
Version as used in RSSOwl 2 (filled)
none
Eclipse 1 (initial)
none
Eclipse 2 (filled)
none
Mac 1 (initial)
none
Mac 1 (initial)
none
Mac 2 (filled)
none
patch
none
screenshot witrh patch
none
updated patch none

Description Benjamin Pasero CLA 2006-05-14 06:08:02 EDT
I think the L&F of the FilteredTree is not yet optimal. I am using variants of it in my own projects, since the functionality is quite cool. For some ideas how the widget could be improved, see the attached screenshots.

If there is a plan to adapt some of the ideas, I can contribute patches based on my own work.

Ben
Comment 1 Benjamin Pasero CLA 2006-05-14 06:10:01 EDT
Created attachment 41411 [details]
Version as used in RSSOwl 1

This is the version I use in RSSOwl 1. A Composite surrounding the Text widget and the ToolItem for clearing. The gray "Search" is deleted once the widget gains focus.
Comment 2 Benjamin Pasero CLA 2006-05-14 06:12:06 EDT
Created attachment 41412 [details]
Version as used in RSSOwl 2 (initial)

Here is another variant of the FilteredTree I use for a TreeViewer. The lense indicates that the inputfield can be used for a search (similiar to Mac's Spotlight). When the input is empty, the inputfield spans the entire width. See the next shot for whats happening when you type in something.
Comment 3 Benjamin Pasero CLA 2006-05-14 06:13:28 EDT
Created attachment 41413 [details]
Version as used in RSSOwl 2 (filled)

As soon as text is filled into the input field, the button for clearing the search becomes visible.
Comment 4 Tod Creasey CLA 2006-06-27 11:18:54 EDT
I like the updated icons - I can bring them up with the visual designers.

Are you searching on the bottom on one of these? I don't think that would be very obvious.
Comment 5 Benjamin Pasero CLA 2006-06-27 13:06:53 EDT
Great to hear that.

Yeah the searchbox is on the bottom of the Tree for a simple reason:
Initially the Search-Box is not present. As soon as the Tree has focus and the user types some keys, the Box will "pop up" and run the incremental search. This feature is also known to Firefox where its called "Begin finding when you begin typing". As you can imagine, showing the Box on top of the Tree would move the entire Tree down by some pixels, which is not very user friendly.  

Ben
Comment 6 Tod Creasey CLA 2006-06-27 14:18:38 EDT
Right - I see where you are coming from. However Firefox is in a tab so it doesn't have a better spot for it (i.e. it put it in the only trim which is at the bottom).

As people read top down and left to right I think we would want to keep it where it is by default or it is too easy to miss. In your case as you bring it up with a keybinding people are expecting something to pop up somewhere.
Comment 7 Benjamin Pasero CLA 2006-06-27 16:10:37 EDT
Yep I agree and I dont wanted to recommend putting the Search-Box below the Tree for the FilteredTree. More interesting for me was making it more obvious for the user what the control is about (by using more/different icons, seperating the control from the Tree).

Ben
Comment 8 Tod Creasey CLA 2006-06-27 16:13:09 EDT
I'll take this one as it is really about updating graphics right now
Comment 9 Andre Weinand CLA 2006-06-28 04:05:31 EDT
My issue with the FilterTree is not so much the eraser graphic but the placement of the eraser:
- if there is no eraser, there is a white area at the end of text field, that prevents the text from being aligned nicely with the Tree (see my first screenshot).
- and if there is an eraser, it is not well integrated with the text field (see my second screenshot).

So I like Ben's first screenshot, but not 2&3 because they suffer from the same problem.

I've added two more shots that show how the Mac solves the problem.
Comment 10 Andre Weinand CLA 2006-06-28 04:06:42 EDT
Created attachment 45443 [details]
Eclipse 1 (initial)
Comment 11 Andre Weinand CLA 2006-06-28 04:08:11 EDT
Created attachment 45444 [details]
Eclipse 2 (filled)
Comment 12 Andre Weinand CLA 2006-06-28 04:10:20 EDT
Created attachment 45445 [details]
Mac 1 (initial)
Comment 13 Andre Weinand CLA 2006-06-28 04:10:27 EDT
Created attachment 45446 [details]
Mac 1 (initial)
Comment 14 Andre Weinand CLA 2006-06-28 04:11:15 EDT
Created attachment 45447 [details]
Mac 2 (filled)
Comment 15 Tod Creasey CLA 2007-06-19 10:35:09 EDT
We have no plans to work on this any further but if you had patch for us to look over we could review it.
Comment 16 Martin Aeschlimann CLA 2008-06-13 11:43:16 EDT
Created attachment 104873 [details]
patch

Suggested fix
Comment 17 Martin Aeschlimann CLA 2008-06-13 11:59:03 EDT
Created attachment 104876 [details]
screenshot witrh patch

This how it looks on WinXP with the same image as before. I suggest that we use make a image request to something a bit smaller, maybe similar as on the Mac, see mockup below
Comment 18 Boris Bokowski CLA 2008-06-13 12:01:30 EDT
On the Mac, we are already using the native widget (rounded corners with in-line icon for clearing the search text.)
Comment 19 Mik Kersten CLA 2008-06-13 12:29:26 EDT
I like the circle and think it looks good, especially being inside the box, but I wonder if it is a bit too Mac-ish since it is a circle, which tends to look very nice within a very rounded box.  On Vista the icon tends to be square-ish.  Check out the screenshots on bug 183581, perhaps this discussion should go there.  One other thing to consider is where else this clear icon should reappear.  Currently Mylyn uses the same little "x" for both the filtered tree icon and for other places where the big "X" for remove looks too big.  I'll attach screenshots to bug 183581.
Comment 20 Mike Wilson CLA 2008-09-11 15:43:21 EDT
We should do this for 3.5. Boris, can you apply the patch and follow up with Kevin.
Comment 21 Kim Peter CLA 2008-09-12 17:10:42 EDT
As noted in bug 183581, I can attach the cut images for the small eraser to be used inside the filter field. I just need to know the plugin. Thanks!
Comment 22 Kim Peter CLA 2008-09-17 10:46:45 EDT
(In reply to comment #21)
> As noted in bug 183581, I can attach the cut images for the small eraser to be
> used inside the filter field. I just need to know the plugin. Thanks!

fyi - The images are now attached in bug 183581.

Comment 23 Boris Bokowski CLA 2008-12-01 16:30:11 EST
Created attachment 119206 [details]
updated patch

I updated the patch to not use Platform.getOS(). It creates a "test widget", once per session, to find out whether the current platform honors the SWT.SEARCH and SWT.CANCEL style bits.
Comment 24 Boris Bokowski CLA 2008-12-01 17:08:51 EST
Patch released to HEAD, together with the images from bug 183581. Tested on Windows XP, GTK, and Carbon. The Cocoa build I got did not work for me, I'll test Cocoa tomorrow.
Comment 25 Markus Keller CLA 2008-12-02 06:34:49 EST
See bug 257176 and bug 257175 for follow-up problem with look and feel.