Skip to content

Commit

Permalink
refactor: removes unnecessary styling and HTML code [IDE-285] (#486)
Browse files Browse the repository at this point in the history
* refactor: restructures the html and css so it can look good in intellij

* refactor: remove ignore styling

* refactor: remove old html setup
  • Loading branch information
teodora-sandu authored Jul 11, 2024
1 parent f066c29 commit bd3ffb6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 82 deletions.
60 changes: 0 additions & 60 deletions media/views/oss/suggestion/suggestion.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
@import '../../common/webview';

.suggestion {
position: relative;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}

.suggestion .suggestion-text {
padding: 0.4rem 0;
margin-bottom: 0.8rem;
Expand All @@ -16,26 +8,6 @@
line-height: 2.4rem;
}

.severity {
display: flex;
flex-direction: column;
flex-grow: 0;
float: left;
margin: 0 1rem 0 0;
text-align: center;
}

.severity .icon {
width: 32px;
height: 32px;
}

.icon {
vertical-align: middle;
width: 16px;
height: 16px;
}

.identifiers {
font-size: 1.3rem;
line-height: 2rem;
Expand All @@ -49,43 +21,11 @@
display: none;
}

.clickable:hover {
cursor: pointer;
}

.delimiter {
width: 0;
height: 1.3rem;
margin: 0 0.8rem 0 0.8rem;
border-right:1px solid var(--vscode-input-border);
line-height: 1rem;
}

.summary .summary-item {
display: flex;
margin: 0.3em 0 0.3em 0;
}

.summary .label {
width: 160px;
}

.summary .content {
flex: 70%;
}

.summary .remediation {
margin-bottom: 1.6rem
}

.summary .detailed-path:last-child .remediation {
margin-bottom: 0
}

.vulnerability-overview pre {
padding: 8px 16px;
overflow-x: auto;
border-radius: 4px;
font-size: var(--vscode-editor-font-size);
font-family: var(--vscode-editor-font-family);
background-color: var(--vscode-editor-background);
Expand Down
13 changes: 0 additions & 13 deletions media/views/snykCode/suggestion/suggestionLS.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@ body {
text-transform: capitalize;
}

// TODO: remove ignore styling at the end of cycle 5 2025
.ignore-warning {
background: #FFF4ED;
color: #B6540B;
border: 1px solid #E27122;
}

.ignore-badge {
background: #FFF4ED;
color: #B6540B;
border: 1px solid #E27122;
}

.data-flow-clickable-row {
color: var(--vscode-textLink-foreground);
}
Expand Down
9 changes: 0 additions & 9 deletions src/snyk/snykOss/providers/ossDetailPanelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ export class OssDetailPanelProvider
const ideStyle = readFileSync(ideStylePath.fsPath, 'utf8');
const nonce = getNonce();

// TODO: remove after the stable CLI release at the end of cycle 5
const styleUri = this.getWebViewUri('media', 'views', 'oss', 'suggestion', 'suggestion.css');
const headerEndValue = `<link href="${styleUri}" rel="stylesheet">`;
const serverityIconName = `${displayMode}-${issue.severity}-severity`;
html = html.replace('${headerEnd}', headerEndValue);
html = html.replaceAll('${cspSource}', this.panel.webview.cspSource);
html = html.replace('${severityIcon}', images[serverityIconName]);
html = html.replace('${learnIcon}', images['learn-icon']);
// TODO: end remove
html = html.replace('${ideStyle}', '<style nonce=${nonce}>' + ideStyle + '</style>');
html = html.replaceAll('${nonce}', nonce);
html = html.replaceAll(/\$\{\w+\}/g, '');
Expand Down

0 comments on commit bd3ffb6

Please sign in to comment.