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

refactor: prepare to use the html/template version of the OSS HTML [IDE-326] #482

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

teodora-sandu
Copy link
Contributor

Description

In snyk/snyk-ls#564 we are refactoring the HTML for OSS to use html/template and also to eventually be able to inject styling for IntelliJ. JCEF only supports <style>styling and not linked stylesheets so refactoring this code to work the same way it does now for Snyk Code by injecting the <style> styling into the ${ideStyle} variable.

We also won't need to inject the icons since they will be injected in the HTML template in LS.

We will deliver this version of VSCode for an older version of the CLI so we need to make sure it works with or without the changes in LS. So test it with and without snyk/snyk-ls#564.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

const ideStyle = readFileSync(ideStylePath.fsPath, 'utf8');
const nonce = getNonce();

// TODO: remove after the stable CLI release at the end of cycle 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to create a ticket to remove this code when we fully enable this HTML panel after the end of cycle 5 and the stable release of the CLI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teodora-sandu teodora-sandu merged commit 036a323 into main Jul 8, 2024
14 checks passed
@teodora-sandu teodora-sandu deleted the refactor/html-template branch July 8, 2024 10:28
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.

2 participants