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

Integration with VS Live Share #232

Merged
merged 1 commit into from
Nov 16, 2018

Conversation

alpaix
Copy link
Contributor

@alpaix alpaix commented Nov 7, 2018

PR Type

This PR is a proposed solution for integrating Visual Studio Live Share extension with Live Server extension that'd help to automate sharing a server in a collaboration session.

[ ] Bugfix
[x] Feature
[x] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other: <!-- Please describe: -->

What is the current behavior?

This solution is a significant improvement in user experience as of today a user sharing a workspace in VSCode needs to share Live Server manually through the interactive flow every time.

What is the new behavior?

With the new flow, upon the collaboration session start Live Server sends a request to share a live server. In response to the request, VS Live Share notifies the host user and requests their permission to start sharing the server.

image

When the host user clicks the Allow button all participants in the collaboration session get access to the shared server.

image

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Implementation Details

VS Live Share provides extensibility API allowing consumers to subscribe to collaboration session events and invoke methods to share/un-share artifacts in the active collaboration session. To help to manage live server sharing state I've introduced LiveShareHelper class that receives notifications from AppModel and VS Live Share API.
To decouple the helper from the model I've extracted IAppModel interface with two new events GoLiveEvent and GoOfflineEvent.

Misc

As tasks.json version 0.1.0 has been deprecated I upgraded the default build task definition to version 2.0.0 using a recommended task template.

####Motivation
This PR is a proposed solution for integrating Visual Studio Live Share extension with Live Server extension that'd help to automate sharing a server in a collaboration session. This solution is a significant improvement in user experience as today a user sharing a workspace in VSCode needs to share Live Server manually through the interactive flow every time.

####New Flow
With the new flow, upon the collaboration session start Live Server sends a request to share a live server. In response to the request, VS Live Share notifies the host user and requests their permission to start sharing the server.

When the host user clicks the Allow button all participants in the collaboration session get access to the shared server.

####Implementation Details
VS Live Share provides extensibility API allowing consumers to subscribe to collaboration session events and invoke methods to share/un-share artifacts in the active collaboration session. To help to manage live server sharing state I've introduced `LiveShareHelper` class that receives notifications from `AppModel` and VS Live Share API.
To decouple the helper from the model I've extracted `IAppModel` interface with two new events `GoLiveEvent` and `GoOfflineEvent`.

####Misc
As `tasks.json` version `0.1.0` has been deprecated I upgraded the default build task definition to version `2.0.0` using a recommended task template.
@lostintangent
Copy link

@ritwickdey Hey! What are your thoughts on this PR? We (the VS Live Share team) have seen a ton of usage of Live Server w/Live Share, and so this should hopefully help increase the discoverability/ergonomics of using the two together.

@ritwickdey
Copy link
Owner

ritwickdey commented Nov 16, 2018

Working like a charm ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️

@ritwickdey ritwickdey merged commit fb06330 into ritwickdey:master Nov 16, 2018
@ritwickdey
Copy link
Owner

Thanks you so much for opening PR 💘 & I'm really sorry for the late (I was busy for my exams and other stuff, extremely sorry 😢 ).....

@alpaix
Copy link
Contributor Author

alpaix commented Nov 16, 2018

@ritwickdey No worries. Thanks a lot for publishing the new version to the Marketplace!

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

Successfully merging this pull request may close these issues.

3 participants