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

Track user focus across editor and integrated terminal #47615

Closed
IlyaBiryukov opened this issue Apr 10, 2018 · 13 comments · Fixed by #52143
Closed

Track user focus across editor and integrated terminal #47615

IlyaBiryukov opened this issue Apr 10, 2018 · 13 comments · Fixed by #52143
Assignees
Labels
api api-proposal feature-request Request for new features or functionality on-testplan
Milestone

Comments

@IlyaBiryukov
Copy link

Issue Type: Feature Request

Right now only active text editor can be tracked with window.activeTextEditor. Though users can focus other UI elements, like integrated terminals, there is no way to tell when user switches focus from the text editor to the integrated terminal, or from one terminal to another.

Because of that user tracking in our extension cannot tell when user has changed focus to an integrated terminal, or switched active terminals.

We'll need something like window.activeTextEditor, but more generic, e.g.
activeWindow: TextEditor | Terminal | .... | undefined

@vscodebot
Copy link

vscodebot bot commented Apr 10, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Apr 10, 2018
@Tyriar
Copy link
Member

Tyriar commented Apr 11, 2018

@IlyaBiryukov why do you need to know what's focused?

@Tyriar Tyriar added api and removed terminal Integrated terminal issues labels Apr 11, 2018
@Tyriar Tyriar assigned bpasero and jrieken and unassigned Tyriar Apr 11, 2018
@Tyriar Tyriar added the under-discussion Issue is under discussion for relevance, priority, approach label Apr 11, 2018
@bpasero bpasero removed their assignment Apr 11, 2018
@IlyaBiryukov
Copy link
Author

@Tyriar one of features of our extension is following user through the IDE. We already can do this for editor, but not other windows.

@Tyriar
Copy link
Member

Tyriar commented Apr 11, 2018

one of features of our extension is following user through the IDE

@IlyaBiryukov what does this mean exactly? What happens as a result of the user clicking in the terminal panel or the explorer?

@IlyaBiryukov
Copy link
Author

@Tyriar If this "follow" mode is turned on, and the user clicks on a (shared) terminal, we want other users to get the corresponding shared terminal focused. Clicking on the explorer (the folder view) won't make the following users to activate their explorers though. We're interested in following the user to places where others can contribute or see what the user is changing.

@jrieken
Copy link
Member

jrieken commented Apr 12, 2018

We'll need something like window.activeTextEditor, but more generic, e.g.
activeWindow: TextEditor | Terminal | .... | undefined

We have kind of decided against this, esp when it comes to webview or tree views which are entirely private to extensions. Also there are UI pieces, like the release notes editor, which take focus but for which we don't have plans to expose in the API.

@IlyaBiryukov
Copy link
Author

Ok, how about just the active terminal window?

@jrieken
Copy link
Member

jrieken commented Apr 13, 2018

@Tyriar Is something like activeTerminal in reach?

@Tyriar
Copy link
Member

Tyriar commented Apr 13, 2018

@jrieken yes we could add this if you think it's a good idea given all the other panels.

@IlyaBiryukov
Copy link
Author

@Tyriar when do you think you can do this?

@Tyriar
Copy link
Member

Tyriar commented Jun 15, 2018

@IlyaBiryukov you also need a onDidChangeActiveTerminal: Event<Terminal> as well don't you?

@IlyaBiryukov
Copy link
Author

Yep

Tyriar added a commit that referenced this issue Jun 17, 2018
@Tyriar
Copy link
Member

Tyriar commented Jun 17, 2018

I'll include this with the big PR for #46192

@Tyriar Tyriar added this to the June 2018 milestone Jun 17, 2018
@Tyriar Tyriar assigned Tyriar and unassigned jrieken Jun 17, 2018
@Tyriar Tyriar added feature-request Request for new features or functionality api-proposal and removed under-discussion Issue is under discussion for relevance, priority, approach labels Jun 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-proposal feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants