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

feat: inject custom styling [IDE-240] #535

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

teodora-sandu
Copy link
Contributor

@teodora-sandu teodora-sandu commented May 29, 2024

Description

Extracts custom IntelliJ styling from snyk-ls and injects it into the HTML after compiling .scss file to .css using https://github.com/EtienneMiret/sass-gradle-plugin. This requires snyk/snyk-ls#522 so that ${ideStyle} is available.

To test:

  • Run make build-debug in snyk-ls in the branch from feat: remove custom styling and inject it from IDE [IDE-240] snyk-ls#522
  • Run make build in the CLI after adding a replace directive for snyk-ls
  • Run the sandbox using runIde
  • Replace the CLI path in the sandbox to the path for the local CLI and disable automatically managing the binaries
  • Make sure to use an org that has the snykCodeConsistentIgnores FF enabled (e.g. ide-consistent-ignores-test)
  • Navigate to a Snyk Code vulnerability

Checklist

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

Screenshots / GIFs

Without the LS change:
Screenshot 2024-05-29 at 15 08 42

With the LS change:

Screenshot 2024-05-29 at 15 01 02

@teodora-sandu teodora-sandu force-pushed the feat/IDE-240-consistent-styles branch 2 times, most recently from dfa0fa3 to 1be34e1 Compare May 29, 2024 14:30
@teodora-sandu teodora-sandu marked this pull request as ready for review May 29, 2024 14:40
@teodora-sandu teodora-sandu requested a review from a team as a code owner May 29, 2024 14:40

.example-line.removed {
background-color: var(--example-line-removed-color);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we need to use a SASS file? I thought SASS is needed when we need things like nesting or mixins or other SASS magic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mostly because we use SASS in VSCode so I wanted to be as consistent as possible across the two, but also because there are more features available in SASS (like you said) and in the future we will have more than Snyk Code styling but still want to share stylesheets or colours across Snyk OSS, Snyk IaC, and Snyk Container

@@ -108,7 +108,7 @@ class LanguageServerWrapper(
try {
val snykLanguageClient = SnykLanguageClient()
languageClient = snykLanguageClient
val logLevel = if (snykLanguageClient.logger.isDebugEnabled) "debug" else "info"
val logLevel = if (snykLanguageClient.logger.isDebugEnabled) "trace" else "info"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove this !!

@bastiandoetsch bastiandoetsch self-requested a review May 31, 2024 13:56
@teodora-sandu teodora-sandu force-pushed the feat/IDE-240-consistent-styles branch from d305b01 to 6eca164 Compare June 3, 2024 09:04
@teodora-sandu teodora-sandu merged commit 6e5ec6d into master Jun 3, 2024
9 checks passed
@teodora-sandu teodora-sandu deleted the feat/IDE-240-consistent-styles branch June 3, 2024 10:27
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