Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add 'title' to search result node #5628

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

kpge
Copy link
Contributor

@kpge kpge commented Jul 3, 2019

add feature:#5627
get file path when hover on the file node in the search result , get search result line when hover on the result, no need to click it and preview.

demo:

fix search result

Signed-off-by: kpge [email protected]

@kpge kpge force-pushed the kpge/search-result-title branch from f308771 to 5ace801 Compare July 3, 2019 12:50
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great!
I'll give others a chance to review as well :)

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code check
execution OK
LGTM

@@ -573,7 +573,8 @@ export class SearchInWorkspaceResultTreeWidget extends TreeWidget {
const icon = node.icon;
return <div className='result'>
<div className='result-head'>
<div className={`result-head-info noWrapInfo noselect ${node.selected ? 'selected' : ''}`}>
<div className={`result-head-info noWrapInfo noselect ${node.selected ? 'selected' : ''}`}
title={new URI(node.fileUri).path.toString()}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about labelProvider.getLongName(new URI(node.fileUri))?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labelProvider.getLongName(new URI(node.fileUri)) returns relative path, but when the workspace is multi root workspace, we should return absolute path

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for now

Generally, we should use getLongName and adjust its implementation properly depending on the current setup in order to have consistent way of representing paths everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will keep this advice in mind and make sure they have consistent way of representing paths.

@akosyakov akosyakov merged commit 757af9e into eclipse-theia:master Jul 5, 2019
@vince-fugnitto
Copy link
Member

@kpge in the future you can write that your PR fixes {PR #} so it's corresponding issue is automatically closed :)

https://github.blog/2013-05-14-closing-issues-via-pull-requests/

@kpge kpge deleted the kpge/search-result-title branch August 6, 2019 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants