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

JSON file outline cannot switch automatically from navigator operation #3928

Closed
legenddcr opened this issue Jan 3, 2019 · 3 comments
Closed
Labels
bug bugs found in the application editor issues related to the editor help wanted issues meant to be picked up, require help outline issues related to the outline

Comments

@legenddcr
Copy link
Contributor

I tested with theia docker next image, version: @theia/xxx 0.4.0-next.b0064648

Simply run a docker command and access local:3000 in Chrome browser.

$ docker run -it -p 3000:3000 theiaide/theia:next
  1. When an empty workspace is open on project folder, I created two simple valid JSON file test.json and another.json with different contents.
  2. Open two files in main panel and Outline view. I can see outline for current JSON file now. And switch the file tab, the outline view changes automatically as expected.
  3. Then I switch two files by File navigator view. Opened JSON file is switched when I click file node in navigator view, however, outline failed to switch accordingly, unless I changed the focus into editor again.

Expected: Outline can follow the change automatically whether by File Tab switch or File Navigator switch.

@akosyakov akosyakov added bug bugs found in the application editor issues related to the editor outline issues related to the outline help wanted issues meant to be picked up, require help labels Jan 3, 2019
@legenddcr
Copy link
Contributor Author

@akosyakov Double click on navigator view can work as expected since focus will be set automatically. However, single click on file node just change the editor content.

Could you confirm this is a real bug, or it is by-design (Single Click vs. Double Click)? Thanks.

@akosyakov
Copy link
Member

It is kind of by design because the outline is based on the current (last focused) editor, but it does not feel good that the outline shows irrelevant content. We could try to improve it in the case if there is no current editor, either by cleaning the outline or using the first visible editor.

@vince-fugnitto
Copy link
Member

I verified the bug and it works correctly on master (da73ae1) when switching between different editors (and previews).
The fix is likely thanks to #7707.

Please re-open if it is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application editor issues related to the editor help wanted issues meant to be picked up, require help outline issues related to the outline
Projects
None yet
Development

No branches or pull requests

3 participants