Replace 'Octicon' refs with 'Codicon'

This commit is contained in:
Miguel Solorio 2019-10-16 11:38:15 -07:00
parent 002829ec3d
commit 42d4a3b5c8
28 changed files with 197 additions and 203 deletions

View file

@ -71,7 +71,6 @@ const indentationFilter = [
'!**/yarn-error.log',
// except multiple specific folders
'!**/octicons/**',
'!**/codicon/**',
'!**/fixtures/**',
'!**/lib/**',

View file

@ -34,7 +34,7 @@
});
</script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden">
<span class=octicon></span>
<span class=codicon></span>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>

View file

@ -2431,7 +2431,7 @@
}
},
{
"c": "octicon",
"c": "codicon",
"t": "text.html.derivative meta.tag.inline.span.start.html meta.attribute.class.html string.unquoted.html",
"r": {
"dark_plus": "string: #CE9178",

View file

@ -50,12 +50,6 @@
margin-right: 4px;
}
.monaco-action-bar .action-label.octicon {
font-size: 15px;
line-height: 35px;
text-align: center;
}
.monaco-action-bar .action-item.disabled .action-label,
.monaco-action-bar .action-item.disabled .action-label:hover {
opacity: 0.4;

View file

@ -10,5 +10,5 @@
}
.codicon-animation-spin {
animation: octicon-spin 1.5s linear infinite;
animation: codicon-spin 1.5s linear infinite;
}

View file

@ -20,7 +20,7 @@ export class HighlightedLabel {
private highlights: IHighlight[] = [];
private didEverRender: boolean = false;
constructor(container: HTMLElement, private supportOcticons: boolean) {
constructor(container: HTMLElement, private supportCodicons: boolean) {
this.domNode = document.createElement('span');
this.domNode.className = 'monaco-highlighted-label';
@ -65,13 +65,13 @@ export class HighlightedLabel {
if (pos < highlight.start) {
htmlContent += '<span>';
const substring = this.text.substring(pos, highlight.start);
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
htmlContent += this.supportCodicons ? renderCodicons(substring) : escape(substring);
htmlContent += '</span>';
pos = highlight.end;
}
htmlContent += '<span class="highlight">';
const substring = this.text.substring(highlight.start, highlight.end);
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
htmlContent += this.supportCodicons ? renderCodicons(substring) : escape(substring);
htmlContent += '</span>';
pos = highlight.end;
}
@ -79,7 +79,7 @@ export class HighlightedLabel {
if (pos < this.text.length) {
htmlContent += '<span>';
const substring = this.text.substring(pos);
htmlContent += this.supportOcticons ? renderCodicons(substring) : escape(substring);
htmlContent += this.supportCodicons ? renderCodicons(substring) : escape(substring);
htmlContent += '</span>';
}

View file

@ -12,7 +12,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
export interface IIconLabelCreationOptions {
supportHighlights?: boolean;
supportDescriptionHighlights?: boolean;
supportOcticons?: boolean;
supportCodicons?: boolean;
}
export interface IIconLabelValueOptions {
@ -100,13 +100,13 @@ export class IconLabel extends Disposable {
this.labelDescriptionContainer = this._register(new FastLabelNode(dom.append(this.domNode.element, dom.$('.monaco-icon-label-description-container'))));
if (options && options.supportHighlights) {
this.labelNode = new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name')), !!options.supportOcticons);
this.labelNode = new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name')), !!options.supportCodicons);
} else {
this.labelNode = this._register(new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('a.label-name'))));
}
if (options && options.supportDescriptionHighlights) {
this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description')), !!options.supportOcticons);
this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description')), !!options.supportCodicons);
} else {
this.descriptionNodeFactory = () => this._register(new FastLabelNode(dom.append(this.labelDescriptionContainer.element, dom.$('span.label-description'))));
}

View file

@ -0,0 +1,135 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { matchesFuzzy, IMatch } from 'vs/base/common/filters';
import { ltrim } from 'vs/base/common/strings';
const codiconStartMarker = '$(';
export interface IParsedCodicons {
readonly text: string;
readonly codiconOffsets?: readonly number[];
}
export function parseCodicons(text: string): IParsedCodicons {
const firstCodiconIndex = text.indexOf(codiconStartMarker);
if (firstCodiconIndex === -1) {
return { text }; // return early if the word does not include an codicon
}
return doParseCodicons(text, firstCodiconIndex);
}
function doParseCodicons(text: string, firstCodiconIndex: number): IParsedCodicons {
const codiconOffsets: number[] = [];
let textWithoutCodicons: string = '';
function appendChars(chars: string) {
if (chars) {
textWithoutCodicons += chars;
for (const _ of chars) {
codiconOffsets.push(codiconsOffset); // make sure to fill in codicon offsets
}
}
}
let currentCodiconStart = -1;
let currentCodiconValue: string = '';
let codiconsOffset = 0;
let char: string;
let nextChar: string;
let offset = firstCodiconIndex;
const length = text.length;
// Append all characters until the first codicon
appendChars(text.substr(0, firstCodiconIndex));
// example: $(file-symlink-file) my cool $(other-codicon) entry
while (offset < length) {
char = text[offset];
nextChar = text[offset + 1];
// beginning of codicon: some value $( <--
if (char === codiconStartMarker[0] && nextChar === codiconStartMarker[1]) {
currentCodiconStart = offset;
// if we had a previous potential codicon value without
// the closing ')', it was actually not an codicon and
// so we have to add it to the actual value
appendChars(currentCodiconValue);
currentCodiconValue = codiconStartMarker;
offset++; // jump over '('
}
// end of codicon: some value $(some-codicon) <--
else if (char === ')' && currentCodiconStart !== -1) {
const currentCodiconLength = offset - currentCodiconStart + 1; // +1 to include the closing ')'
codiconsOffset += currentCodiconLength;
currentCodiconStart = -1;
currentCodiconValue = '';
}
// within codicon
else if (currentCodiconStart !== -1) {
// Make sure this is a real codicon name
if (/^[a-z0-9\-]$/i.test(char)) {
currentCodiconValue += char;
} else {
// This is not a real codicon, treat it as text
appendChars(currentCodiconValue);
currentCodiconStart = -1;
currentCodiconValue = '';
}
}
// any value outside of codicons
else {
appendChars(char);
}
offset++;
}
// if we had a previous potential codicon value without
// the closing ')', it was actually not an codicon and
// so we have to add it to the actual value
appendChars(currentCodiconValue);
return { text: textWithoutCodicons, codiconOffsets };
}
export function matchesFuzzyCodiconAware(query: string, target: IParsedCodicons, enableSeparateSubstringMatching = false): IMatch[] | null {
const { text, codiconOffsets } = target;
// Return early if there are no codicon markers in the word to match against
if (!codiconOffsets || codiconOffsets.length === 0) {
return matchesFuzzy(query, text, enableSeparateSubstringMatching);
}
// Trim the word to match against because it could have leading
// whitespace now if the word started with an codicon
const wordToMatchAgainstWithoutCodiconsTrimmed = ltrim(text, ' ');
const leadingWhitespaceOffset = text.length - wordToMatchAgainstWithoutCodiconsTrimmed.length;
// match on value without codicons
const matches = matchesFuzzy(query, wordToMatchAgainstWithoutCodiconsTrimmed, enableSeparateSubstringMatching);
// Map matches back to offsets with codicons and trimming
if (matches) {
for (const match of matches) {
const codiconOffset = codiconOffsets[match.start + leadingWhitespaceOffset] /* codicon offsets at index */ + leadingWhitespaceOffset /* overall leading whitespace offset */;
match.start += codiconOffset;
match.end += codiconOffset;
}
}
return matches;
}

View file

@ -1,135 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { matchesFuzzy, IMatch } from 'vs/base/common/filters';
import { ltrim } from 'vs/base/common/strings';
const octiconStartMarker = '$(';
export interface IParsedOcticons {
readonly text: string;
readonly octiconOffsets?: readonly number[];
}
export function parseOcticons(text: string): IParsedOcticons {
const firstOcticonIndex = text.indexOf(octiconStartMarker);
if (firstOcticonIndex === -1) {
return { text }; // return early if the word does not include an octicon
}
return doParseOcticons(text, firstOcticonIndex);
}
function doParseOcticons(text: string, firstOcticonIndex: number): IParsedOcticons {
const octiconOffsets: number[] = [];
let textWithoutOcticons: string = '';
function appendChars(chars: string) {
if (chars) {
textWithoutOcticons += chars;
for (const _ of chars) {
octiconOffsets.push(octiconsOffset); // make sure to fill in octicon offsets
}
}
}
let currentOcticonStart = -1;
let currentOcticonValue: string = '';
let octiconsOffset = 0;
let char: string;
let nextChar: string;
let offset = firstOcticonIndex;
const length = text.length;
// Append all characters until the first octicon
appendChars(text.substr(0, firstOcticonIndex));
// example: $(file-symlink-file) my cool $(other-octicon) entry
while (offset < length) {
char = text[offset];
nextChar = text[offset + 1];
// beginning of octicon: some value $( <--
if (char === octiconStartMarker[0] && nextChar === octiconStartMarker[1]) {
currentOcticonStart = offset;
// if we had a previous potential octicon value without
// the closing ')', it was actually not an octicon and
// so we have to add it to the actual value
appendChars(currentOcticonValue);
currentOcticonValue = octiconStartMarker;
offset++; // jump over '('
}
// end of octicon: some value $(some-octicon) <--
else if (char === ')' && currentOcticonStart !== -1) {
const currentOcticonLength = offset - currentOcticonStart + 1; // +1 to include the closing ')'
octiconsOffset += currentOcticonLength;
currentOcticonStart = -1;
currentOcticonValue = '';
}
// within octicon
else if (currentOcticonStart !== -1) {
// Make sure this is a real octicon name
if (/^[a-z0-9\-]$/i.test(char)) {
currentOcticonValue += char;
} else {
// This is not a real octicon, treat it as text
appendChars(currentOcticonValue);
currentOcticonStart = -1;
currentOcticonValue = '';
}
}
// any value outside of octicons
else {
appendChars(char);
}
offset++;
}
// if we had a previous potential octicon value without
// the closing ')', it was actually not an octicon and
// so we have to add it to the actual value
appendChars(currentOcticonValue);
return { text: textWithoutOcticons, octiconOffsets };
}
export function matchesFuzzyOcticonAware(query: string, target: IParsedOcticons, enableSeparateSubstringMatching = false): IMatch[] | null {
const { text, octiconOffsets } = target;
// Return early if there are no octicon markers in the word to match against
if (!octiconOffsets || octiconOffsets.length === 0) {
return matchesFuzzy(query, text, enableSeparateSubstringMatching);
}
// Trim the word to match against because it could have leading
// whitespace now if the word started with an octicon
const wordToMatchAgainstWithoutOcticonsTrimmed = ltrim(text, ' ');
const leadingWhitespaceOffset = text.length - wordToMatchAgainstWithoutOcticonsTrimmed.length;
// match on value without octicons
const matches = matchesFuzzy(query, wordToMatchAgainstWithoutOcticonsTrimmed, enableSeparateSubstringMatching);
// Map matches back to offsets with octicons and trimming
if (matches) {
for (const match of matches) {
const octiconOffset = octiconOffsets[match.start + leadingWhitespaceOffset] /* octicon offsets at index */ + leadingWhitespaceOffset /* overall leading whitespace offset */;
match.start += octiconOffset;
match.end += octiconOffset;
}
}
return matches;
}

View file

@ -351,7 +351,7 @@ class Renderer implements IRenderer<QuickOpenEntry> {
row1.appendChild(icon);
// Label
const label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportOcticons: true });
const label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportCodicons: true });
// Keybinding
const keybindingContainer = document.createElement('span');

View file

@ -4,14 +4,14 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { IMatch } from 'vs/base/common/filters';
import { matchesFuzzyOcticonAware, parseOcticons, IParsedOcticons } from 'vs/base/common/octicon';
import { matchesFuzzyCodiconAware, parseCodicons, IParsedCodicons } from 'vs/base/common/codicon';
export interface IOcticonFilter {
export interface ICodiconFilter {
// Returns null if word doesn't match.
(query: string, target: IParsedOcticons): IMatch[] | null;
(query: string, target: IParsedCodicons): IMatch[] | null;
}
function filterOk(filter: IOcticonFilter, word: string, target: IParsedOcticons, highlights?: { start: number; end: number; }[]) {
function filterOk(filter: ICodiconFilter, word: string, target: IParsedCodicons, highlights?: { start: number; end: number; }[]) {
let r = filter(word, target);
assert(r);
if (highlights) {
@ -19,24 +19,24 @@ function filterOk(filter: IOcticonFilter, word: string, target: IParsedOcticons,
}
}
suite('Octicon', () => {
test('matchesFuzzzyOcticonAware', () => {
suite('Codicon', () => {
test('matchesFuzzzyCodiconAware', () => {
// Camel Case
filterOk(matchesFuzzyOcticonAware, 'ccr', parseOcticons('$(octicon)CamelCaseRocks$(octicon)'), [
filterOk(matchesFuzzyCodiconAware, 'ccr', parseCodicons('$(codicon)CamelCaseRocks$(codicon)'), [
{ start: 10, end: 11 },
{ start: 15, end: 16 },
{ start: 19, end: 20 }
]);
filterOk(matchesFuzzyOcticonAware, 'ccr', parseOcticons('$(octicon) CamelCaseRocks $(octicon)'), [
filterOk(matchesFuzzyCodiconAware, 'ccr', parseCodicons('$(codicon) CamelCaseRocks $(codicon)'), [
{ start: 11, end: 12 },
{ start: 16, end: 17 },
{ start: 20, end: 21 }
]);
filterOk(matchesFuzzyOcticonAware, 'iut', parseOcticons('$(octicon) Indent $(octico) Using $(octic) Tpaces'), [
filterOk(matchesFuzzyCodiconAware, 'iut', parseCodicons('$(codicon) Indent $(octico) Using $(octic) Tpaces'), [
{ start: 11, end: 12 },
{ start: 28, end: 29 },
{ start: 43, end: 44 },
@ -44,22 +44,22 @@ suite('Octicon', () => {
// Prefix
filterOk(matchesFuzzyOcticonAware, 'using', parseOcticons('$(octicon) Indent Using Spaces'), [
filterOk(matchesFuzzyCodiconAware, 'using', parseCodicons('$(codicon) Indent Using Spaces'), [
{ start: 18, end: 23 },
]);
// Broken Octicon
// Broken Codicon
filterOk(matchesFuzzyOcticonAware, 'octicon', parseOcticons('This $(octicon Indent Using Spaces'), [
filterOk(matchesFuzzyCodiconAware, 'codicon', parseCodicons('This $(codicon Indent Using Spaces'), [
{ start: 7, end: 14 },
]);
filterOk(matchesFuzzyOcticonAware, 'indent', parseOcticons('This $octicon Indent Using Spaces'), [
filterOk(matchesFuzzyCodiconAware, 'indent', parseCodicons('This $codicon Indent Using Spaces'), [
{ start: 14, end: 20 },
]);
// Testing #59343
filterOk(matchesFuzzyOcticonAware, 'unt', parseOcticons('$(primitive-dot) $(file-text) Untitled-1'), [
filterOk(matchesFuzzyCodiconAware, 'unt', parseCodicons('$(primitive-dot) $(file-text) Untitled-1'), [
{ start: 30, end: 33 },
]);
});

View file

@ -647,8 +647,8 @@ export class IssueReporter extends Disposable {
issueState = $('span.issue-state');
const issueIcon = $('span.issue-icon');
const octicon = new CodiconLabel(issueIcon);
octicon.text = issue.state === 'open' ? '$(issue-opened)' : '$(issue-closed)';
const codicon = new CodiconLabel(issueIcon);
codicon.text = issue.state === 'open' ? '$(issue-opened)' : '$(issue-closed)';
const issueStateLabel = $('span.issue-state.label');
issueStateLabel.textContent = issue.state === 'open' ? localize('open', "Open") : localize('closed', "Closed");

View file

@ -352,7 +352,7 @@ a {
text-overflow: ellipsis;
}
.issues-container > .issue > .issue-state .octicon {
.issues-container > .issue > .issue-state .codicon {
width: 16px;
}

View file

@ -52,7 +52,7 @@
background-position: center center;
}
.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.octicon {
.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.codicon {
margin: 0;
}

View file

@ -116,7 +116,7 @@ class Renderer implements IListRenderer<CompletionItem, ISuggestionTemplateData>
const text = append(container, $('.contents'));
const main = append(text, $('.main'));
data.iconLabel = new IconLabel(main, { supportHighlights: true, supportOcticons: true });
data.iconLabel = new IconLabel(main, { supportHighlights: true, supportCodicons: true });
data.disposables.add(data.iconLabel);
data.typeLabel = append(main, $('span.type-label'));

View file

@ -11,7 +11,7 @@ import { WorkbenchList } from 'vs/platform/list/browser/listService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IQuickPickItem, IQuickPickItemButtonEvent, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput';
import { IMatch } from 'vs/base/common/filters';
import { matchesFuzzyOcticonAware, parseOcticons } from 'vs/base/common/octicon';
import { matchesFuzzyCodiconAware, parseCodicons } from 'vs/base/common/codicon';
import { compareAnything } from 'vs/base/common/comparers';
import { Emitter, Event } from 'vs/base/common/event';
import { assign } from 'vs/base/common/objects';
@ -114,7 +114,7 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
const row2 = dom.append(rows, $('.quick-input-list-row'));
// Label
data.label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportOcticons: true });
data.label = new IconLabel(row1, { supportHighlights: true, supportDescriptionHighlights: true, supportCodicons: true });
// Detail
const detailContainer = dom.append(row2, $('.quick-input-list-label-meta'));
@ -152,7 +152,7 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
// ARIA label
data.entry.setAttribute('aria-label', [element.saneLabel, element.saneDescription, element.saneDetail]
.map(s => s && parseOcticons(s).text)
.map(s => s && parseCodicons(s).text)
.filter(s => !!s)
.join(', '));
@ -490,12 +490,12 @@ export class QuickInputList {
});
}
// Filter by value (since we support octicons, use octicon aware fuzzy matching)
// Filter by value (since we support codicons, use codicon aware fuzzy matching)
else {
this.elements.forEach(element => {
const labelHighlights = this.matchOnLabel ? withNullAsUndefined(matchesFuzzyOcticonAware(query, parseOcticons(element.saneLabel))) : undefined;
const descriptionHighlights = this.matchOnDescription ? withNullAsUndefined(matchesFuzzyOcticonAware(query, parseOcticons(element.saneDescription || ''))) : undefined;
const detailHighlights = this.matchOnDetail ? withNullAsUndefined(matchesFuzzyOcticonAware(query, parseOcticons(element.saneDetail || ''))) : undefined;
const labelHighlights = this.matchOnLabel ? withNullAsUndefined(matchesFuzzyCodiconAware(query, parseCodicons(element.saneLabel))) : undefined;
const descriptionHighlights = this.matchOnDescription ? withNullAsUndefined(matchesFuzzyCodiconAware(query, parseCodicons(element.saneDescription || ''))) : undefined;
const detailHighlights = this.matchOnDetail ? withNullAsUndefined(matchesFuzzyCodiconAware(query, parseCodicons(element.saneDetail || ''))) : undefined;
if (labelHighlights || descriptionHighlights || detailHighlights) {
element.labelHighlights = labelHighlights;

View file

@ -34,7 +34,7 @@
width: 100%;
}
.monaco-editor .review-widget .body .review-comment .comment-title .action-label.octicon {
.monaco-editor .review-widget .body .review-comment .comment-title .action-label.codicon {
line-height: 18px;
}
@ -413,7 +413,7 @@
background-position: center center;
}
.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .action-label.octicon {
.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .action-label.codicon {
margin: 0;
}

View file

@ -646,7 +646,7 @@ class ReplEvaluationResultsRenderer implements ITreeRenderer<ReplEvaluationResul
linkDetector: this.linkDetector
});
if (expression.hasChildren) {
templateData.annotation.className = 'annotation octicon octicon-info';
templateData.annotation.className = 'annotation codicon codicon-info';
templateData.annotation.title = nls.localize('stateCapture', "Object state is captured from first evaluation");
}
}
@ -781,7 +781,7 @@ class ReplRawObjectsRenderer implements ITreeRenderer<RawObjectReplElement, Fuzz
// annotation if any
if (element.annotation) {
templateData.annotation.className = 'annotation octicon octicon-info';
templateData.annotation.className = 'annotation codicon codicon-info';
templateData.annotation.title = element.annotation;
} else {
templateData.annotation.className = '';

View file

@ -877,7 +877,7 @@ export class ServerExtensionsView extends ExtensionsListView {
getActions(): IAction[] {
if (this.extensionManagementServerService.remoteExtensionManagementServer && this.extensionManagementServerService.localExtensionManagementServer === this.server) {
const installLocalExtensionsInRemoteAction = this._register(this.instantiationService.createInstance(InstallLocalExtensionsInRemoteAction));
installLocalExtensionsInRemoteAction.class = 'octicon octicon-cloud-download';
installLocalExtensionsInRemoteAction.class = 'codicon codicon-cloud-download';
return [installLocalExtensionsInRemoteAction];
}
return [];
@ -974,11 +974,11 @@ export class WorkspaceRecommendedExtensionsView extends ExtensionsListView {
getActions(): IAction[] {
if (!this.installAllAction) {
this.installAllAction = this._register(this.instantiationService.createInstance(InstallWorkspaceRecommendedExtensionsAction, InstallWorkspaceRecommendedExtensionsAction.ID, InstallWorkspaceRecommendedExtensionsAction.LABEL, []));
this.installAllAction.class = 'octicon octicon-cloud-download';
this.installAllAction.class = 'codicon codicon-cloud-download';
}
const configureWorkspaceFolderAction = this._register(this.instantiationService.createInstance(ConfigureWorkspaceFolderRecommendedExtensionsAction, ConfigureWorkspaceFolderRecommendedExtensionsAction.ID, ConfigureWorkspaceFolderRecommendedExtensionsAction.LABEL));
configureWorkspaceFolderAction.class = 'octicon octicon-pencil';
configureWorkspaceFolderAction.class = 'codicon codicon-pencil';
return [this.installAllAction, configureWorkspaceFolderAction];
}

View file

@ -81,7 +81,7 @@ export class InstallCountWidget extends ExtensionWidget {
installLabel = installCount.toLocaleString(platform.locale);
}
append(this.container, $('span.octicon.octicon-cloud-download'));
append(this.container, $('span.codicon.codicon-cloud-download'));
const count = append(this.container, $('span.count'));
count.textContent = installLabel;
}
@ -224,7 +224,7 @@ export class RecommendationWidget extends ExtensionWidget {
if (extRecommendations[this.extension.identifier.id.toLowerCase()]) {
this.element = append(this.parent, $('div.bookmark'));
const recommendation = append(this.element, $('.recommendation'));
append(recommendation, $('span.octicon.octicon-star'));
append(recommendation, $('span.codicon.codicon-star'));
const applyBookmarkStyle = (theme: ITheme) => {
const bgColor = theme.getColor(extensionButtonProminentBackground);
const fgColor = theme.getColor(extensionButtonProminentForeground);
@ -290,7 +290,7 @@ class RemoteBadge extends Disposable {
}
private render(): void {
append(this.element, $('span.octicon.octicon-remote'));
append(this.element, $('span.codicon.codicon-remote'));
const applyBadgeStyle = () => {
if (!this.element) {

View file

@ -46,7 +46,7 @@
justify-content: center;
}
.extension-editor > .header > .icon-container .extension-remote-badge .octicon {
.extension-editor > .header > .icon-container .extension-remote-badge .codicon {
font-size: 28px;
}

View file

@ -31,7 +31,7 @@
margin-right: 4px;
}
.extensions-viewlet > .extensions .extension-view-header .monaco-action-bar .action-item > .action-label.icon.octicon {
.extensions-viewlet > .extensions .extension-view-header .monaco-action-bar .action-item > .action-label.icon.codicon {
vertical-align: middle;
line-height: 22px;
}
@ -84,10 +84,11 @@
box-sizing: border-box;
}
.extensions-viewlet > .extensions .monaco-list-row > .bookmark > .recommendation > .octicon {
.extensions-viewlet > .extensions .monaco-list-row > .bookmark > .recommendation > .codicon {
position: absolute;
top: 1px;
left: 1px;
color: inherit;
font-size: 90%;
}
@ -146,7 +147,7 @@
justify-content: center;
}
.extensions-viewlet > .extensions .monaco-list-row > .extension > .details > .header-container > .header .extension-remote-badge > .octicon {
.extensions-viewlet > .extensions .monaco-list-row > .extension > .details > .header-container > .header .extension-remote-badge > .codicon {
font-size: 12px;
}
@ -200,7 +201,7 @@
margin: 0 6px;
}
.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count > .octicon {
.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count > .codicon {
font-size: 120%;
margin-right: 2px;
}

View file

@ -71,7 +71,7 @@ export class FeedbackStatusbarConribution extends Disposable implements IWorkben
if (!this.dropdown) {
const statusContainr = document.getElementById('status.feedback');
if (statusContainr) {
const icon = statusContainr.getElementsByClassName('octicon').item(0) as HTMLElement | null;
const icon = statusContainr.getElementsByClassName('codicon').item(0) as HTMLElement | null;
if (!icon) {
throw new Error('Could not find icon');
}

View file

@ -302,7 +302,7 @@ class MarkerWidget extends Disposable {
const action = new Action('problems.action.toggleMultiline');
action.enabled = !!viewModel && marker.lines.length > 1;
action.tooltip = multiline ? localize('single line', "Show message in single line") : localize('multi line', "Show message in multiple lines");
action.class = multiline ? 'octicon octicon-chevron-up' : 'octicon octicon-chevron-down';
action.class = multiline ? 'codicon codicon-chevron-up' : 'codicon codicon-chevron-down';
action.run = () => { if (viewModel) { viewModel.multiline = !viewModel.multiline; } return Promise.resolve(); };
this.multilineActionbar.push([action], { icon: true, label: false });
}

View file

@ -342,7 +342,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
this.container = container;
this.labelElement = DOM.$('.action-title');
this.detailsElement = DOM.$('.action-details');
this.dropDownElement = DOM.$('.dropdown-icon.octicon.octicon-triangle-down.hide');
this.dropDownElement = DOM.$('.dropdown-icon.codicon.codicon-triangle-down.hide');
this.anchorElement = DOM.$('a.action-label.folder-settings', {
role: 'button',
'aria-haspopup': 'true',

View file

@ -48,7 +48,7 @@
align-items: center;
}
.scm-viewlet .monaco-list-row > .scm-provider > .monaco-action-bar .action-label .octicon {
.scm-viewlet .monaco-list-row > .scm-provider > .monaco-action-bar .action-label .codicon {
font-size: 14px;
}

View file

@ -212,7 +212,7 @@ class WelcomeOverlay extends Disposable {
}
private updateProblemsKey() {
const problems = document.querySelector('div[id="workbench.parts.statusbar"] .statusbar-item.left .octicon.octicon-warning');
const problems = document.querySelector('div[id="workbench.parts.statusbar"] .statusbar-item.left .codicon.codicon-warning');
const key = this._overlay.querySelector('.key.problems') as HTMLElement;
if (problems instanceof HTMLElement) {
const target = problems.getBoundingClientRect();

View file

@ -44,11 +44,11 @@ export class StatusBar {
private getSelector(element: StatusBarElement): string {
switch (element) {
case StatusBarElement.BRANCH_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-git-branch`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-git-branch`;
case StatusBarElement.SYNC_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-sync`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-sync`;
case StatusBarElement.PROBLEMS_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-error`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-error`;
case StatusBarElement.SELECTION_STATUS:
return `${this.mainSelector} ${this.rightSelector}[title="Go to Line"]`;
case StatusBarElement.INDENTATION_STATUS: