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

Access visible source control providers #53892

Closed
RMacfarlane opened this issue Jul 9, 2018 · 4 comments
Closed

Access visible source control providers #53892

RMacfarlane opened this issue Jul 9, 2018 · 4 comments
Assignees
Labels
api api-proposal scm General SCM compound issues
Milestone

Comments

@RMacfarlane
Copy link
Contributor

From the discussion in #51734, we want to introduce a visibleSourceControls api that allows extensions to get a list of currently selected providers and be notified of changes.

@RMacfarlane
Copy link
Contributor Author

The plan now is to expose an API for this through the git extension by having an event on the git Source Control object that fires when it is selected.

I assume there would also be a corresponding "blur" event. This means that a change in selection wouldn't be an atomic event, but a blur of one control and focus of another. Alternately, instead of separate blur and focus events, there's one change event that fires with a boolean indicating which it is, but selection change is still not atomic. @joaomoreno what did you have in mind for this? And a list of source controls would be exposed through the git extension, correct?

// cc @jrieken

@jrieken jrieken modified the milestones: July 2018, August 2018 Jul 26, 2018
@joaomoreno
Copy link
Member

joaomoreno commented Aug 2, 2018

Do we really need a blur event? Isn't a selection change event enough?

And a list of source controls would be exposed through the git extension, correct?

Correct!

@joaomoreno joaomoreno self-assigned this Aug 2, 2018
@RMacfarlane
Copy link
Contributor Author

Perhaps I just misunderstood the explanation of the proposal - if it's just to move visibleSourceControls and onDidChangeVisibleSourceControls to the git extension API, then there's no need for the blur event. But I thought it was something like an onDidSelect event on a source control object itself

@joaomoreno
Copy link
Member

Oh I see what you mean. Yeah that's true. Unless the git extension does some debouncing, users of the API would get two separate events.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-proposal scm General SCM compound issues
Projects
None yet
Development

No branches or pull requests

3 participants