powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

NPS Survey Form

Open ritikramuka opened this issue 1 year ago • 0 comments

This pull request includes changes primarily aimed at refactoring the handling of web extension scripts and the addition of a new dependency. The changes can be grouped into two main categories:

  1. Refactoring of the script fetching and handling mechanism in the web extension context.
  2. Addition of new dependencies and configuration changes in the package and build setup.

The most important changes include:

Refactoring of script handling:

  • src/web/client/WebExtensionContext.ts: The method getWorkerScript is renamed to fetchLocalScriptContent and all references to workerUrl are changed to scriptUrl. The telemetry event names are also updated accordingly.
  • src/web/client/common/constants.ts: The constant WEB_EXTENSION_FETCH_WORKER_SCRIPT_FAILED is replaced by WEB_EXTENSION_FETCH_LOCAL_SCRIPT_CONTENT_FAILED.
  • src/web/client/extension.ts: The call to getWorkerScript is replaced with fetchLocalScriptContent.
  • src/web/client/telemetry/constants.ts: New telemetry event names related to fetching local script content are added.
  • src/web/client/webViews/NPSWebView.ts: The method _getHtml is replaced by initializeWebView which handles errors and disposes the webview panel if necessary. The HTML content is updated to use the new script handling method and the survey SDK. [1] [2]

Addition of new dependencies and configuration changes:

  • .npmrc: A new npm registry is added.
  • package.json: The copy-webpack-plugin and @gia/survey-sdk dependencies are added. [1] [2]
  • webpack.config.js: The copy-webpack-plugin is required and used in the webConfig to copy the survey SDK from node_modules to the dist/media directory. [1] [2]

ritikramuka avatar Jun 28 '24 06:06 ritikramuka