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

Add onDidChangeActiveEditor API #43803

Closed
wants to merge 1 commit into from
Closed

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Feb 16, 2018

Part of #43713

Adds a new api onDidChangeActiveEditor which generalizes onDidChangeActiveTextEditor to also detect switches to and from webviews.

This API replaces the Webview.onBecameActive and Webview.onBecameInactive events previously prototyped. We discussed a few alternative designs at the Redmond sitdown, including:

  • Add a new onDidChangeActiveWebview API for webviews specifically
  • Modify the existing onDidChangeActiveTextEditor API to support webviews
  • Or keep the focus and blur events on the webview object itself.

We settled on onDidChangeActiveEditor as it fits with the design of our current APIs while also allowing expansion to support other "Editor" types in the future, such as ones for the Output or potentially even for the terminal.

Part of #43713

Adds a new api `onDidChangeActiveEditor` which generalizes `onDidChangeActiveTextEditor` to also detect switches to and from webviews.

This API replaces the `Webview.onBecameActive` and `Webview.onBecameInactive` events previously prototyped.
@mjbvz mjbvz force-pushed the add-on-did-change-active-editor branch from c0a64fa to 70dac6a Compare February 16, 2018 03:33
@bpasero bpasero self-assigned this Feb 16, 2018
@bpasero bpasero added this to the February 2018 milestone Feb 16, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 17, 2018

Other APIs to consider for making webviews first class editors:

window.showEditor(editor: TextEditor | Webview);

window.onDidChangeVisibleEditors: Event<TextEditor | Webview>

window.onDidChangeEditorViewColumn: Event<...>

@bpasero
Copy link
Member

bpasero commented Feb 19, 2018

@mjbvz I am removing myself as reviewer since the code changed is nothing I own.

@bpasero bpasero removed their request for review February 19, 2018 09:14
@bpasero bpasero removed their assignment Feb 19, 2018
@bpasero bpasero removed this from the February 2018 milestone Feb 19, 2018
@Tyriar
Copy link
Member

Tyriar commented Feb 20, 2018

Ditto 😄

@Tyriar Tyriar removed their request for review February 20, 2018 14:49
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 20, 2018

@bpasero @Tyriar Who currently owns the editor management apis?

@bpasero
Copy link
Member

bpasero commented Feb 21, 2018

@mjbvz that would be @jrieken

@mjbvz mjbvz self-assigned this Feb 21, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 22, 2018

Merged into #44165

@mjbvz mjbvz closed this Feb 22, 2018
@mjbvz mjbvz deleted the add-on-did-change-active-editor branch March 2, 2018 20:54
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants