mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix errors due to icon to codicon rename in VSCode (#7837)
Found numerous errors where icons weren't rendering correctly. - Anything that's an action must have CSS using "codicon" not "icon" since VSCode sets the "codicon" class automatically. This affected Agent view in particular, but also: - acounts view - new tab view in dashboard - many more - Anything referencing the common-icons.css icons needed updating. This hid help tooltip text in FormContainer UI for example. - Finally I tried to convert all references from icon -> codicon, even when the CSS was technically correct. This was done for maintainability reasons - from now on always add codicon. Fixes #7827
This commit is contained in:
@@ -45,6 +45,7 @@ import { ITextResourcePropertiesService } from 'vs/editor/common/services/resour
|
||||
|
||||
const labelDisplay = nls.localize("insights.item", "Item");
|
||||
const valueDisplay = nls.localize("insights.value", "Value");
|
||||
const iconClass = 'codicon';
|
||||
|
||||
class InsightTableView<T> extends ViewletPanel {
|
||||
private _table: Table<T>;
|
||||
@@ -88,22 +89,22 @@ function stateFormatter(row: number, cell: number, value: any, columnDef: Slick.
|
||||
|
||||
// render icon if passed
|
||||
if (resource.icon) {
|
||||
icon.classList.add('icon');
|
||||
icon.classList.add(iconClass);
|
||||
icon.classList.add(resource.icon);
|
||||
} else {
|
||||
icon.classList.remove('icon');
|
||||
icon.classList.remove(iconClass);
|
||||
}
|
||||
|
||||
//render state badge if present
|
||||
if (resource.stateColor) {
|
||||
badgeContent.style.backgroundColor = resource.stateColor;
|
||||
badgeContent.classList.remove('icon');
|
||||
badgeContent.classList.remove(iconClass);
|
||||
} else if (resource.stateIcon) {
|
||||
badgeContent.style.backgroundColor = '';
|
||||
badgeContent.classList.add('icon');
|
||||
badgeContent.classList.add(iconClass);
|
||||
badgeContent.classList.add(resource.stateIcon);
|
||||
} else {
|
||||
badgeContent.classList.remove('icon');
|
||||
badgeContent.classList.remove(iconClass);
|
||||
badgeContent.style.backgroundColor = '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user