-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[SIW] Add support to search in outside workspace content #8646
[SIW] Add support to search in outside workspace content #8646
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
20aa6e8
to
093e3be
Compare
I fixed the bug and tested again 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest changes work well for me 👍
What it does
Fixes #6867
search-in-workspace
now supports searching in files that are opened in an editor but are not in the workspace root.Other files
in Search view.How to test
Other files
node in Search view.Other files
node is only displayed when there's multi-root in the search result tree (including theOther files
node)Review checklist
Reminder for reviewers
Signed-off-by: DukeNgn [email protected]