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

support active/focused view or panel when clause context #6062

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Aug 29, 2019

What it does

See https://code.visualstudio.com/docs/getstarted/keybindings#_activefocused-view-or-panel-when-clause-context for requirements. Important: in this context active means visible, not focused as usual.

In VS Code there are viewlets, panels and views:

  • viewlet is a tab in the left area (explorer, scm, search, debug, etc.)
  • panel is a tab in the bottom area (terminals, markers, output, debug console, etc.)
  • view is a part in the viewlet, e.g. files and outline are views in the explorer viewlet

Important difference to Theia that VS Code does not allow to move individual viewlets or panels to other areas. It means that there is always only one visible viewlet or panel in VS Code, but in Theia it can be that several viewlets and panels widgets are visible. This PR implements the difference by setting context keys to last focused visible viewlet or panel widget.

How to test

Review checklist

Reminder for reviewers

@akosyakov akosyakov requested a review from a team as a code owner August 29, 2019 07:21
@akosyakov akosyakov added the vscode issues related to VSCode compatibility label Aug 29, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using your provided vsix, I was able to successfully test the scenarios you mentioned:

activeViewlet & activePanel

Viewlet Status
Explorer 👍
Search 👍
SCM 👍
Debug 👍
Markers 👍
Output 👍
Terminal 👍

I'm not sure which view repl is or how to trigger the search panel.

focusedView

Viewlet Status
Node Dependencies 👍

@akosyakov
Copy link
Member Author

  • repl is the debug console, you can open it from the debug view
  • search panel is then search view is located not in the side areas, but in main or bottom

@vince-fugnitto
Copy link
Member

  • repl is the debug console, you can open it from the debug view
  • search panel is then search view is located not in the side areas, but in main or bottom

I quickly tested, both cases work as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support active/focused view or panel when closures
2 participants