Bug 526453 - Search dialog: disambiguate "Selected Resources"
Summary: Search dialog: disambiguate "Selected Resources"
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.8 M4   Edit
Assignee: Lucas Bullen CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2017-10-25 08:56 EDT by Mickael Istria CLA
Modified: 2017-11-20 11:24 EST (History)
3 users (show)

See Also:


Attachments
Screenshot of ugly search dialog (21.29 KB, image/png)
2017-11-09 12:18 EST, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2017-10-25 08:56:16 EDT
In the File Search dialog, the "Selected Reosources" option should be disambiguized, showing the single folder/project name if only one is selected, or showing the amount of such selected resources when there are more than ones.
Comment 1 Lars Vogel CLA 2017-10-25 11:51:10 EDT
+1
Comment 2 Eclipse Genie CLA 2017-11-07 16:08:24 EST
New Gerrit change created: https://git.eclipse.org/r/111177
Comment 4 Mickael Istria CLA 2017-11-08 12:33:42 EST
Yet another great patch Lucas! Thank you!
Comment 5 Dani Megert CLA 2017-11-09 12:16:32 EST
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/111177 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=4e0ad0c1c3cd6a3e0cb2a46f01ed9600aef09bd8
> 

Please revert that change.
- It makes the dialog painful to read/use. See attached screenshot.
- It does not work when the selected resource is an editor.
Comment 6 Dani Megert CLA 2017-11-09 12:18:06 EST
Created attachment 271399 [details]
Screenshot of ugly search dialog
Comment 7 Mickael Istria CLA 2017-11-09 12:23:33 EST
(In reply to Dani Megert from comment #5)
> Please revert that change.

I don't think the issues you mentioned are worth a revert over incremental improvements.

> - It makes the dialog painful to read/use. See attached screenshot.

Would trimming the label if it's too wide, so org.eclipse.ui.examples.views.properties.tabbed.article would be replaced by org.ecl...article (with 7 chars then '...' then 7 chars) for instance work?

> - It does not work when the selected resource is an editor.

Works for me. Do you have steps to reproduce? Maybe it depends on the editor or its input?
Comment 8 Dani Megert CLA 2017-11-09 12:38:39 EST
(In reply to Mickael Istria from comment #7)
> (In reply to Dani Megert from comment #5)
> > Please revert that change.
> 
> I don't think the issues you mentioned are worth a revert over incremental
> improvements.
> 
> > - It makes the dialog painful to read/use. See attached screenshot.
> 
> Would trimming the label if it's too wide, so
> org.eclipse.ui.examples.views.properties.tabbed.article would be replaced by
> org.ecl...article (with 7 chars then '...' then 7 chars) for instance work?

I doubt the overall value of this.
- What does it bring you that it tells you it will search 123 vs. 219 resources? To me this is useless information wasting screen real estate.
- Showing the name of the selected resource is also useless: select any 'META-INF' folder in your workspace and open the Search dialog. It will say "Selected 'META-INF' resource. But which one of the 130 I have in my workspace?

Also "Enclosing '...' project" is wrong. The workspace is enclosing that thing, but the search happens in the project that is enclosing 'META-INF' (using the previous example).



> > - It does not work when the selected resource is an editor.
> 
> Works for me. Do you have steps to reproduce? Maybe it depends on the editor
> or its input?

Take any file in the text editor. It says 'Selected Resources' -> does not work.
Comment 9 Mickael Istria CLA 2017-11-09 13:20:21 EST
(In reply to Dani Megert from comment #8)
> - What does it bring you that it tells you it will search 123 vs. 219
> resources? To me this is useless information wasting screen real estate.
> - Showing the name of the selected resource is also useless: select any
> 'META-INF' folder in your workspace and open the Search dialog. It will say
> "Selected 'META-INF' resource. But which one of the 130 I have in my
> workspace?

It tells whether you have started the search from the right view. If I have a selection of 3 folders in the Package Explorer and one file in the editor, it very often happens to me that the search starts against the wrong selection because I didn't think about putting focus on the right view..
With these informations, I can very easily spot my mistake and fix it before starting the search and realizing it takes too much time or gives too many results,

> Also "Enclosing '...' project" is wrong. The workspace is enclosing that
> thing, but the search happens in the project that is enclosing 'META-INF'
> (using the previous example).

What is "thing"? I don't fully get this comment.
When I have 3 META-INF folders selected and see "3 enclosing workspaces" or if I've only one and see "Enclosing 'org.eclipse.ui.ide' project", I understand what it's about and running the search gives results conform to my understanding of this sentence.
What would you suggest instead?

> > > - It does not work when the selected resource is an editor.
> > 
> > Works for me. Do you have steps to reproduce? Maybe it depends on the editor
> > or its input?
> 
> Take any file in the text editor. It says 'Selected Resources' -> does not
> work.

Ok, I can see the issue now. I guess my previous attempts seemed to work because of my typical mistake of not properly managing focus when doing Ctrl+H as mentioned above.
Comment 10 Lucas Bullen CLA 2017-11-09 13:30:11 EST
I do see a value in having it as X Resources Selected, most the time I do a search I am not confident in the scope of my selection.

I suggest if it is easy to do such, revert the patch, remove the file name use as the variable button sizing does not look great, fix it when the selected resource is an editor, and just have the following scenarios:

Selected Resource - one resource selected
X Selected Resources - multiple
Selected Resources - none (as it will be disabled)
Comment 11 Mickael Istria CLA 2017-11-09 13:44:22 EST
(In reply to Lucas Bullen from comment #10)
> remove the file name use as the variable button sizing does not look great,
> [...]
> and just have the following scenarios:
> 
> Selected Resource - one resource selected
> X Selected Resources - multiple
> Selected Resources - none (as it will be disabled)

I would still find in ambiguous in many cases: let's imagine I have one file selected in the Project Eclipse and another file in another view and another file open in editor. I do Ctrl+H, then there is nothing to help me finding out whether I've got the right scope for the search.
Making the UI better is important, but showing the name is even more. Usability is more important to me than prettiness of dialogs. Then I think the proposal I made about shrinking down too long resource names would fit all of us.

> fix it when the selected resource is an editor

+1
Comment 12 Eclipse Genie CLA 2017-11-10 08:20:01 EST
New Gerrit change created: https://git.eclipse.org/r/111383
Comment 13 Dani Megert CLA 2017-11-10 09:47:52 EST
(In reply to Mickael Istria from comment #9)
> > Also "Enclosing '...' project" is wrong. The workspace is enclosing that
> > thing, but the search happens in the project that is enclosing 'META-INF'
> > (using the previous example).
> 
> What is "thing"? I don't fully get this comment.
> When I have 3 META-INF folders selected and see "3 enclosing workspaces" or
> if I've only one and see "Enclosing 'org.eclipse.ui.ide' project", I
> understand what it's about and running the search gives results conform to
> my understanding of this sentence.
> What would you suggest instead?

"Enclosing project x.y.z" sounds sounds weird. "Project 'x.y.z' would be much more natural.
Comment 14 Dani Megert CLA 2017-11-10 09:52:12 EST
(In reply to Mickael Istria from comment #11)
> I would still find in ambiguous in many cases: let's imagine I have one file
> selected in the Project Eclipse and another file in another view and another
> file open in editor. I do Ctrl+H, then there is nothing to help me finding
> out whether I've got the right scope for the search.

From this and your previous comment it sounds like not the amount of resources is important but from which view it comes. How about showing

Selected resources in '<view/editor name>'
Enclosed projects in '<view/editor name>'

I would agree that such additional information would also be useful to me.


> just have the following scenarios:
> Selected Resource - one resource selected
> X Selected Resources - multiple
> Selected Resources - none (as it will be disabled)

If we can't agree on something else, like showing the part name (see above), this would be an acceptable solution for me.
Comment 15 Lucas Bullen CLA 2017-11-10 10:40:03 EST
One last shot:
Selected resources button:
Selected resource in '<view/editor name>' - one selected resource
X Selected resources in '<view/editor name>' - multiple selected resources
Selected resources - no selection (will be disabled)

Enclosing projects button:
Enclosing project - one enclosing project (already presented with enough info in the 'Selected resources' button to figure it out)
X Enclosing projects - multiple enclosing projects
Enclosing projects - no selection (will be disabled)
Comment 16 Dani Megert CLA 2017-11-10 10:44:35 EST
(In reply to Lucas Bullen from comment #15)
> One last shot:
> Selected resources button:
> Selected resource in '<view/editor name>' - one selected resource
> X Selected resources in '<view/editor name>' - multiple selected resources
Should use lowercase 's' ==> X selected resources...

> Selected resources - no selection (will be disabled)
> 
> Enclosing projects button:
> Enclosing project - one enclosing project (already presented with enough
> info in the 'Selected resources' button to figure it out)
> X Enclosing projects - multiple enclosing projects
Should be lowercase 'E' ==> X enclosing projects
> Enclosing projects - no selection (will be disabled)

+1 :-)
Comment 17 Mickael Istria CLA 2017-11-14 11:07:39 EST
With the last proposal, it still requires me some effort to resolve what it actually the content of the scope, as the labels do use the indirection to the view (which is not exactly a scope).
Anyway, feel free to proceed if it suits both of you. I'll try it, and maybe will realize I like it better than expected. And if not, I'll open a new bug later ;)
Comment 19 Dani Megert CLA 2017-11-20 11:24:04 EST
Thanks Lucas!