Bug 496496 - hovering over a file in search matches should show full path, not just filename
Summary: hovering over a file in search matches should show full path, not just filename
Status: CLOSED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 12.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 15.0   Edit
Assignee: XinYi Jiang CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-06-21 12:41 EDT by Grant Gayed CLA
Modified: 2017-06-08 14:18 EDT (History)
3 users (show)

See Also:


Attachments
screenshot (83.71 KB, image/png)
2017-04-05 12:25 EDT, Grant Gayed CLA
no flags Details
file-explorer-tree-hover.png (6.02 KB, image/png)
2017-04-05 17:25 EDT, Carolyn MacLeod CLA
no flags Details
hovers.png (315.34 KB, image/png)
2017-04-05 17:43 EDT, Carolyn MacLeod CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2016-06-21 12:41:20 EDT
Steps:
- Ctrl+Shift+H, search for a string that will be found in your workspace
- hover over a file in the list of files containing matches and the hover text just shows the filename, which is not helpful since the filename is what's already shown in the list
- however there are contexts where knowing the file's full path helps to differentiate identically-named files in different places

When running in a browser it's possible to "work around" this shortcoming by looking at the url shown by the browser when hovering over a file in the list of matches.  However in the Electron app, which is where I really noticed this, there's no hint available anywhere, just the truncated paths of all matching files.
Comment 1 Michael Rennie CLA 2017-01-10 15:37:24 EST
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Comment 2 Grant Gayed CLA 2017-04-05 12:24:34 EDT
Reopening, got hit with this again using Electron, I think this needs to be addressed.

Screenshot is attached in next comment of what I ran into today while doing a Search on "getRemoteCallbacks".  My workspace apparently has three copies of file remotes.js containing this string.  The problem is I can't tell them apart at all, they're all just ".../git/remotes.js".  I made a change in just the first one thinking that the three displayed copies was a different search bug, but now see that I've changed 1/3 of the places but have no idea if it's the "right" one or not.
Comment 3 Grant Gayed CLA 2017-04-05 12:25:08 EDT
Created attachment 267666 [details]
screenshot
Comment 4 Carolyn MacLeod CLA 2017-04-05 13:08:31 EDT
You can click on the "Show/Hide full path" switch (.../) to see full path names.
Comment 5 Grant Gayed CLA 2017-04-05 15:24:27 EDT
(In reply to Carolyn MacLeod from comment #4)

Ok, completely missed that.  My assumption/expectation of the full paths being shown by hovering probably came from behaviours I'm used to in Eclipse.  Perhaps there's nothing to do here then, though I prefer the "lightness" of the hover approach over having the switcher.
Comment 6 Carolyn MacLeod CLA 2017-04-05 17:25:20 EDT
Created attachment 267668 [details]
file-explorer-tree-hover.png

I think (?) that tree hovers typically just show the clipped part of a tree item when the tree is too narrow. Here's a snap of Win File Explorer showing non-full-path hover.

Having said that, however, the search doesn't show the full tree item, only the last part. (i.e. instead of ".../git/remotes.js (3 matches)" it only shows "remotes.js".  We could revisit that.
Comment 7 Carolyn MacLeod CLA 2017-04-05 17:27:32 EDT
When the search result is selected (so that the file shows in the editor), then the full path of the file can be seen in the breadcrumb hover (in case that's useful).
Comment 8 Carolyn MacLeod CLA 2017-04-05 17:43:40 EDT
Created attachment 267670 [details]
hovers.png

Checked out Eclipse search, just to see if there's anything we can use there.
I've attached a composite screen snap with 3 hovers.

- The (default) search view is horizontal so there's more real estate for paths, which they show in a lighter color following the short name.
(note that they show the full file system path for files in a jar, and the fully-qualified name for files in a java project).

- When I drag the Search view to a vertical place, hovers show the full text string that you see for each tree node in the horizontal Search view in the snap

- Hovers in a "too narrow" navigator tree only show short name

- 2 other hovers are for unselected editor tab and selected editor tab
Comment 9 Steve Northover CLA 2017-04-06 18:37:53 EDT
Why don't we sort the result so the like-file group together (at least) so I know there are 3 copies and I need to beware?
Comment 10 Eclipse Genie CLA 2017-04-07 15:58:18 EDT
New Gerrit change created: https://git.eclipse.org/r/94698
Comment 11 Eclipse Genie CLA 2017-04-11 10:06:36 EDT
GitHub Pull Request 7 created by [soulbeing]
https://github.com/eclipse/orion.client/pull/7
Comment 12 XinYi Jiang CLA 2017-05-19 16:23:39 EDT
Fixed in https://github.com/eclipse/orion.client/pull/7
Comment 13 Grant Gayed CLA 2017-05-29 16:44:18 EDT
Trying this out now, the new hovers feel heavy.  As a first step can the following small changes be made?

1. Don't show the hovers if the Show Full Paths toggle is on.
2. Don't show the path segments that precede the project name (eg.- get rid of the first three segments in: "Root/file/Grant_Gayed@ca.ibm.com-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.css")
3. Make the font match other hovers (currently appears to be bold)
4. Make its vertical padding match other hovers (currently appears to be larger)
Comment 14 Eclipse Genie CLA 2017-05-31 11:06:42 EDT
GitHub Pull Request 41 created by [soulbeing]
https://github.com/eclipse/orion.client/pull/41
Comment 15 XinYi Jiang CLA 2017-06-08 14:18:50 EDT
(In reply to Grant Gayed from comment #13)
> Trying this out now, the new hovers feel heavy.  As a first step can the
> following small changes be made?
> 
> 1. Don't show the hovers if the Show Full Paths toggle is on.
> 2. Don't show the path segments that precede the project name (eg.- get rid
> of the first three segments in:
> "Root/file/Grant_Gayed@ca.ibm.com-OrionContent/org.eclipse.orion.client/
> bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.css")
> 3. Make the font match other hovers (currently appears to be bold)
> 4. Make its vertical padding match other hovers (currently appears to be
> larger)

Can you try it out and see if you like what it looks like now? I addressed your comments.