-
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
file-seach: improve handling of command #7846
Conversation
packages/file-search/src/browser/quick-file-open-contribution.ts
Outdated
Show resolved
Hide resolved
f4a92a7
to
e8382a8
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.
Somewhere in the issue, it should stipulate this is for ELECTRON only, not for the browser. If there is no workspace and I do (CTRL + P) in the browser, there is a command attach to it.(Print)
Works as expected BUT if I open the command and remove the ">", it says in the quick open bar "File name to search" , but it is looking inside the workspace and if there is no workspace, it does nothing. (As an end-user, I expect something here) Should we allow to have the quick open search box available in this case?
Second, If I open a file (CTRL + O) with no workspace, it opens the file and then the command (CTRL+P) it opens the quick search , but still, cannot return any files to open.
This comment has been minimized.
This comment has been minimized.
So if not exclusive to ELECTRON, then it does not work properly since the command ( CTRL + P) in a CHROME browser, it tries to print, not opening the quick open file selection |
@lmcbout the command should not be present without a workspace present (which is the case). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@akosyakov what should the behavior be when we are in the |
@vince-fugnitto VS Code shows the quick find always, so no fix? introducing a new context key is nice anyway |
I can align to show the context-menu. |
This commit introduces the `workspaceState` when context which can be used by commands to have proper `when` closure. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto Not sure what you mean. In VS Code they always show the quick search, we should do the same, just fix the error in console. If we show it always then there is no print. |
Yes I’m currently working on it. |
Let's wait for issues from adopters about it. We don't need to fix each possible combination if it never used. |
- improves the quick-file open to show 'no matching results' when a search yields no results - improves handling of no workspaces - enables the command always similarly to vscode Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
e8382a8
to
1611504
Compare
@lmcbout do you mind retrying the pull-request? |
@vince-fugnitto will do in a few minutes. |
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.
Tested on UBUNtu 18.04
Tested on electron, Firefox and Chrome
When there is no workspace, the "CTRLCMD+P"now open the quick open menu and works as expected
Note: may be on this PR or on another PR: If we use "CTRLCMD+P", -> open the quick view, then I enter the whole path for the file, we should allow to open that file even if there is no workspace.
i.e. "CTRLCMD+P" then enter "/home/lmcbout/.bashrc" (I am on UBUNTU, so this file exist for me), the file should open in the editor
@lmcbout this is not the purpose of the quick-file open (it does not search for files outside the workspace nor does it open files on the filesystem by path). This behavior also does not align with vscode so I am not for adding it. |
Just did a quick test on VSCODE and the file opens, so I guess it would be aligned with VSCODE 👍 |
Not in this pull-request. |
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.
have not tried, but code changes look good
What it does
Fixes #7844
This pull-request contributes the following items:
workspaceState
when context which can ultimately be used by new commandsNo matching results
)How to test
file-search
command (ctrlcmd+p)No matching results
itemfile-search
command (ctrlcmd+p)adsaasdadsadad
) it should yield theNo matching results
itemReview checklist
Reminder for reviewers
Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com