[SIW] Add support to search in outside workspace content#8646
[SIW] Add support to search in outside workspace content#8646paul-marechal merged 1 commit intoeclipse-theia:masterfrom
Conversation
e369c32 to
6419715
Compare
08b478f to
750b9ef
Compare
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
bfdcaa5 to
fd67d0c
Compare
paul-marechal
left a comment
There was a problem hiding this comment.
Code LGTM with few nitpicks, feature wise I noticed that it shows the Other files root node even when there is no matches for workspaces. The expected behavior in this case is to not show this Other files node, and only display it if there's others roots to display.
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Outdated
Show resolved
Hide resolved
39d5c48 to
430dc7d
Compare
|
@marechal-p Thanks for the review. I tried to address the use case you mentioned but unfortunately, I don't see an approach that is available with our current implementation. One approach is to get the number of root folder node in However, because With my current approach in this PR, I believe the main functionality is not being affected. The only thing that is a bit off is the UX for a specific use-case ( |
packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx
Show resolved
Hide resolved
430dc7d to
a97cb3a
Compare
|
I just rebased against About the mentioned use-case (no ws results are found,
|
vince-fugnitto
left a comment
There was a problem hiding this comment.
There is currently a bug which can be reproduced as follows:
- start the application with a single-root workspace
- open a file outside the workspace
- perform a search which does not yield results in the external file
- the search tree is incorrectly rendered with a root node of the workspace
5777162 to
20aa6e8
Compare
+ Search results from outside workspace editor are displayed and grouped under `Other files ` node in search view. Signed-off-by: Duc Nguyen <duc.a.nguyen@ericsson.com>
20aa6e8 to
093e3be
Compare
|
I fixed the bug and tested again 👍 |
vince-fugnitto
left a comment
There was a problem hiding this comment.
The latest changes work well for me 👍
What it does
Fixes #6867
search-in-workspacenow supports searching in files that are opened in an editor but are not in the workspace root.Other filesin Search view.How to test
Other filesnode in Search view.Other filesnode is only displayed when there's multi-root in the search result tree (including theOther filesnode)Review checklist
Reminder for reviewers
Signed-off-by: DukeNgn duc.a.nguyen@ericsson.com