This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 373275 - show "Content Assist Available" decoration in task list find box
Summary: show "Content Assist Available" decoration in task list find box
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-05 13:19 EST by Sam Davis CLA
Modified: 2012-03-15 14:16 EDT (History)
2 users (show)

See Also:


Attachments
screenshot (4.62 KB, image/png)
2012-03-06 14:08 EST, Sam Davis CLA
no flags Details
mylyn/context/zip (1.74 KB, application/octet-stream)
2012-03-08 17:46 EST, David Green CLA
no flags Details
clipped icon. (576 bytes, image/png)
2012-03-12 13:16 EDT, Sam Davis CLA
no flags Details
mylyn/context/zip (17.57 KB, application/octet-stream)
2012-03-14 13:38 EDT, Sam Davis CLA
no flags Details
task list search decorator (15.06 KB, image/png)
2012-03-15 13:54 EDT, Leo Dos Santos CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-03-05 13:19:15 EST
I only discovered there was content assist by reading the N&N. It would make sense to show the same decoration as used in other places that support content assist.
Comment 1 Steffen Pingel CLA 2012-03-06 00:56:07 EST
It was decided not to show a content assist decoration to avoid cluttering the UI. We can reconsider but I'm inclined to mark this as won't fix.
Comment 2 David Green CLA 2012-03-06 13:51:01 EST
agreed - I tried it out and it really detracts from the UI
Comment 3 Sam Davis CLA 2012-03-06 14:08:38 EST
Created attachment 212155 [details]
screenshot

Here's a screenshot just to make sure we're talking about the same thing. I don't understand how this is any worse than all the other places the icon is shown. It would only be visible when typing in the find box.

I think it's worth showing it to have UI consistency and discoverability of features. The checkbox to only search the summary causes more clutter IMO.
Comment 4 Sam Davis CLA 2012-03-06 14:11:23 EST
If we don't want to have the icon, we should at least consider a tooltip on the find box, although that actually creates more clutter in a way.
Comment 5 Steffen Pingel CLA 2012-03-07 02:31:27 EST
Thanks for the screenshot. The icon looks restrained to me. The fact there is already a lot of UI clutter in Eclipse isn't a great argument to add more but I have added this bug as a UI review item for the upcoming Mylyn call to discuss the proposed change.
Comment 6 Sam Davis CLA 2012-03-07 02:48:48 EST
I guess I do see your point. I still think it's bad not to be consistent, and to hide such a useful feature. Another option would be to display the content assist as soon as the user first clicks in the find box, as some plugins do, but I'm not sure that would be better.
Comment 7 Sam Davis CLA 2012-03-07 02:51:48 EST
Yet another option, longer term, is to have some sort of callout to open an "advanced" find dialog which would make it easier to see what is supported. The real purpose of the dialog would be to provide a wider search box and perhaps to show the results in the search view.
Comment 8 Steffen Pingel CLA 2012-03-08 13:17:12 EST
We decided to try this to make content assist more discoverable. Sam, can you commit your change to master and add a 1 or 2 px margin to the left of the light bulb?
Comment 9 Sam Davis CLA 2012-03-08 15:06:36 EST
I have not made any change. The screenshot I attached was just a mockup.
Comment 10 Steffen Pingel CLA 2012-03-08 15:31:29 EST
Excellent artwork :). I'll grab this then.
Comment 11 David Green CLA 2012-03-08 17:46:09 EST
See the attached context - the code is in there, just commented out.
Comment 12 David Green CLA 2012-03-08 17:46:15 EST
Created attachment 212337 [details]
mylyn/context/zip
Comment 13 Steffen Pingel CLA 2012-03-09 05:42:27 EST
The decoration is now shown when the search field has the focus.

David, you can pass a boolean parameter to ContentAssistCommandAdapter to install the decoration which saves a few lines of code.
Comment 14 Sam Davis CLA 2012-03-12 13:16:46 EDT
Created attachment 212483 [details]
clipped icon.

I like the idea of showing the icon in the search field, I think, but the icon is clipped.
Comment 15 Sam Davis CLA 2012-03-12 13:17:23 EDT
Also, the tootltip says "Content assist available (null)"
Comment 16 Steffen Pingel CLA 2012-03-12 14:25:30 EDT
At this point we can't make any non-standard UI changes of that sort.
Comment 17 Sam Davis CLA 2012-03-12 16:12:14 EDT
I didn't realize it was standard for the tooltip to say null. ;)
Comment 18 David Green CLA 2012-03-12 16:26:39 EDT
(In reply to comment #13)
> David, you can pass a boolean parameter to ContentAssistCommandAdapter to
> install the decoration which saves a few lines of code.

Thanks Steffen, I wasn't aware of that API.  Much cleaner.
Comment 19 Steffen Pingel CLA 2012-03-13 04:57:29 EDT
(In reply to comment #17)
> I didn't realize it was standard for the tooltip to say null. ;)

Feel free to commit a fix. I took a quick look and it wasn't clear to me why the command handler binding didn't set the tooltip as expected.
Comment 20 Sam Davis CLA 2012-03-14 13:37:58 EDT
The problem is that the binding service hasn't been initialized yet when the decoration is created on startup. If you close and reopen the task list the tooltip is set correctly. Wrapping the call to adaptTextSearchControl in an asyncExec would fix it, but it also causes the decoration to be drawn to the left of the text field.
Comment 21 Sam Davis CLA 2012-03-14 13:38:00 EDT
Created attachment 212672 [details]
mylyn/context/zip
Comment 22 David Green CLA 2012-03-14 15:05:59 EDT
it's normal for the decoration to appear to the left of the control
Comment 23 Steffen Pingel CLA 2012-03-14 15:10:12 EDT
Nice find. That seems simple enough that we should go with the asyncExec(). I'll make that change once bug 373178 is resolved.
Comment 24 Sam Davis CLA 2012-03-14 15:36:03 EDT
(In reply to comment #22)
> it's normal for the decoration to appear to the left of the control

I assumed it was deliberate that it doesn't in this case. With my suggested change, there may need to be some padding added because the decoration is partly obscured by the border of the text field.
Comment 25 Steffen Pingel CLA 2012-03-14 15:57:30 EDT
I didn't realize the screenshot depicted an actual problem on Windows. I'll look into a fix.
Comment 26 Sam Davis CLA 2012-03-14 16:07:26 EDT
Ahhh. I didn't realize you thought that was a suggestion.
Comment 27 Steffen Pingel CLA 2012-03-14 17:06:20 EDT
I have pushed a fix for the margin. The icon is now shown inside the text field on Windows and to the left on other platforms. Leo, can you verify what it looks like on Mac? 

The asyncExec() tweak doesn't work all the time but it seems to improve behavior in some cases. I did notice though that if the the Task List view isn't visible on startup and then made visible the decoration isn't shown if the find field is focused shortly after making the view visible. Please comment if you have other suggestions how to address this.
Comment 28 Leo Dos Santos CLA 2012-03-15 13:54:14 EDT
Created attachment 212738 [details]
task list search decorator
Comment 29 Steffen Pingel CLA 2012-03-15 14:16:40 EDT
Thanks Leo! That looks reasonable.