-
Notifications
You must be signed in to change notification settings - Fork 38
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
NPS Survey Form #987
Draft
ritikramuka
wants to merge
33
commits into
main
Choose a base branch
from
users/ramukaritik/NPS-Survey-Form
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
NPS Survey Form #987
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bpack-plugin, and used @gia/survey sdk to create NPS survey form
The NPSWebView has been updated to include a Content-Security-Policy meta tag in the head section of the HTML. This tag helps to improve the security of the web view by restricting the sources from which content can be loaded. The new meta tag specifies that only 'self' and 'unsafe-inline' sources are allowed for styles, and only 'self' sources are allowed for scripts. This helps to mitigate the risk of cross-site scripting (XSS) attacks.
feat: Add NPS access token to WebExtensionContext The WebExtensionContext class has been updated to include a new property, `npsAccessToken`, which stores the NPS access token. This allows the token to be accessed and used within the context of the extension. This change enables the NPS service to authenticate and send telemetry data.
…m/microsoft/powerplatform-vscode into users/ramukaritik/NPS-Survey-Form
The NPSWebView has been updated to include the NPS access token and user information retrieved from the WebExtensionContext. This allows the NPS service to authenticate the user and send telemetry data. Additionally, the code has been refactored to use template literals for improved readability and maintainability.
updated PR yml to Authenticate npm registry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
The most important changes include:
Refactoring of script handling:
src/web/client/WebExtensionContext.ts
: The methodgetWorkerScript
is renamed tofetchLocalScriptContent
and all references toworkerUrl
are changed toscriptUrl
. The telemetry event names are also updated accordingly.src/web/client/common/constants.ts
: The constantWEB_EXTENSION_FETCH_WORKER_SCRIPT_FAILED
is replaced byWEB_EXTENSION_FETCH_LOCAL_SCRIPT_CONTENT_FAILED
.src/web/client/extension.ts
: The call togetWorkerScript
is replaced withfetchLocalScriptContent
.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 byinitializeWebView
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
: Thecopy-webpack-plugin
and@gia/survey-sdk
dependencies are added. [1] [2]webpack.config.js
: Thecopy-webpack-plugin
is required and used in thewebConfig
to copy the survey SDK fromnode_modules
to thedist/media
directory. [1] [2]