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

File search doesn't open files as preview #7589

Closed
dsseng opened this issue Apr 16, 2020 · 7 comments · Fixed by #10839
Closed

File search doesn't open files as preview #7589

dsseng opened this issue Apr 16, 2020 · 7 comments · Fixed by #10839
Labels
good first issue good first issues for new contributors help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace

Comments

@dsseng
Copy link
Contributor

dsseng commented Apr 16, 2020

Description

When you click (1 time) on any search result, the file is opened in edit mode, not preview one.

Reproduction Steps

  1. Ctrl + Shift + F
  2. Search for anything
  3. Click on a result

OS and Theia version:
OS: Ubuntu 19.10
Theia: master

Diagnostics:

@akosyakov akosyakov added help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace labels Apr 16, 2020
@akosyakov
Copy link
Member

It should be easy to fix by passing preview: true in the opener options.

@dsseng
Copy link
Contributor Author

dsseng commented Apr 16, 2020

@akosyakov if so, please add good first issue or another beginner-friendly label to it.

@akosyakov akosyakov added the good first issue good first issues for new contributors label Apr 16, 2020
@akosyakov
Copy link
Member

I think this line should be changed: https://github.com/maksimr/theia/blob/eabdf8800811c56435c499b84792f360616e360c/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx#L708

But please pay attention there is some preview flag. It could be worth to test different paths leading to this code with different preview value.

cc @vince-fugnitto @elaihau @marechal-p I remember you tried to improve it last time?

@vince-fugnitto
Copy link
Member

I thought such a behavior would not be possible without coupling search-in-workspace with editor-preview (if we want to have previewable editors which are updated upon new selections in the tree). I also think this behavior will not work if a application-developer does not explicitly depend on editor-preview.

@dsseng
Copy link
Contributor Author

dsseng commented Apr 16, 2020

@vince-fugnitto what's about dynamical detection of required services and using preview if it's available? Sorry if it's impossible, didn't dig into those parts of code.

@akosyakov
Copy link
Member

You don't need to add a dependency. If editor-preview is not installed then preview flag will be ignored.

nisarhassan12 added a commit to nisarhassan12/theia that referenced this issue May 26, 2020
Signed-off-by: Nisar Hassan Naqvi <[email protected]>
@ronabet
Copy link

ronabet commented Oct 26, 2020

It should be easy to fix by passing preview: true in the opener options.
@akosyakov
I checked it and it didn`t solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good first issues for new contributors help wanted issues meant to be picked up, require help search in workspace issues related to the search-in-workspace
Projects
None yet
4 participants