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: removes unnecessary styling and HTML code [IDE-285] #486

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading