Skip to content

Commit

Permalink
fix: updated ui elements with a pencil to indicate that branch is edi…
Browse files Browse the repository at this point in the history
…table
  • Loading branch information
acke authored and Catalina Oyaneder committed Jul 15, 2024
1 parent cd30e1b commit f757c5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
File renamed without changes
2 changes: 1 addition & 1 deletion src/snyk/common/views/issueTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export abstract class ProductIssueTreeProvider<T> extends AnalysisTreeNodeProvid
if (deltaFindingsEnabled) {
return new TreeNode({
text: 'Base branch: main',
icon: NODE_ICONS.branch,
icon: NODE_ICONS.pencil,
command: this.setBaseBranchCommand(),
});
}
Expand Down
6 changes: 5 additions & 1 deletion src/snyk/common/views/treeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface INodeIcon {
['dark']: string;
}

type NODE_ICON_TYPE = 'critical' | 'high' | 'medium' | 'low' | 'error' | 'branch';
type NODE_ICON_TYPE = 'critical' | 'high' | 'medium' | 'low' | 'error' | 'branch' | 'pencil';

export const NODE_ICONS: { [key in NODE_ICON_TYPE]: INodeIcon } = {
critical: {
Expand All @@ -34,6 +34,10 @@ export const NODE_ICONS: { [key in NODE_ICON_TYPE]: INodeIcon } = {
light: path.join(__filename, '..', '..', '..', '..', '..', 'media', 'images', 'branch_icon.svg'),
dark: path.join(__filename, '..', '..', '..', '..', '..', 'media', 'images', 'branch_icon.svg'),
},
pencil: {
light: path.join(__filename, '..', '..', '..', '..', '..', 'media', 'images', 'branch_icon.svg'),
dark: path.join(__filename, '..', '..', '..', '..', '..', 'media', 'images', 'pencil.svg'),
},
};

export type InternalType = {
Expand Down
4 changes: 2 additions & 2 deletions src/snyk/snykCode/views/securityIssueTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export default class CodeSecurityIssueTreeProvider extends IssueTreeProvider {
protected getIssueFoundText(nIssues: number, ignoredIssueCount: number): string {
if (nIssues > 0) {
let text;

if (nIssues === 1) {
text = `${nIssues} vulnerability found by Snyk`;
} else {
text = `✋ ${nIssues} vulnerabilities found by Snyk`;
}

const isIgnoresEnabled = configuration.getFeatureFlag(FEATURE_FLAGS.consistentIgnores);
if (isIgnoresEnabled) {
text += `, ${ignoredIssueCount} ignored`;
Expand Down

0 comments on commit f757c5c

Please sign in to comment.