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

Added site runtime preview code behind ECS Config #1052

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ashwani123p
Copy link
Contributor

@ashwani123p ashwani123p commented Oct 24, 2024

Overview

This PR introduces a feature that enables launching Microsoft Edge DevTools directly within Visual Studio Code for the PreviewSite functionality within VSCode Desktop. On executing the command, the Microsoft Edge Tools extension will be triggered to provide an in-editor preview environment. Additionally, this PR implements a check for the launch.json configuration and an ECS flag to manage feature availability.

Changes Made

  • launchBrowserAndDevToolsWithinVsCode in PreviewSite: Added a new command to launch the Edge DevTools project within VS Code.
  • updateLaunchJsonConfig in LaunchJsonHelper: Created a helper function to modify the launch.json configuration when required by the PreviewSite launch.
  • ECS Flag for Feature Toggle (enableSiteRuntimePreview): Added an ECS configuration setting to determine feature availability.
  • Changes in extension.ts file are:
    • When ECS config is enabled, website details were fetched from PPAPI Service, and the site preview launched with the correct URL which matched with websiteRecordId in site repo.
    • When disabled, the command reverted to the existing portalWebView.createOrShow behavior which previewing html content.

@ashwani123p ashwani123p requested review from a team as code owners October 24, 2024 22:38
@ashwani123p
Copy link
Contributor Author

@ashwani123p please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

src/common/services/PPAPIService.ts Outdated Show resolved Hide resolved
src/common/utilities/WorkspaceInfoFinderUtil.ts Outdated Show resolved Hide resolved
src/client/runtimeSitePreview/PreviewSite.ts Outdated Show resolved Hide resolved
src/client/runtimeSitePreview/LaunchJsonHelper.ts Outdated Show resolved Hide resolved
src/client/extension.ts Show resolved Hide resolved
src/client/extension.ts Outdated Show resolved Hide resolved
src/client/extension.ts Show resolved Hide resolved
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.

4 participants