Adding tooltips and fixing spacing (#18400) (#18403)

This commit is contained in:
Aasim Khan
2022-02-16 13:30:53 -08:00
committed by GitHub
parent 1f08aded06
commit d204fa9940

View File

@@ -18,6 +18,7 @@ import { ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar';
import { removeLineBreaks } from 'sql/base/common/strings';
import { isString } from 'vs/base/common/types';
import { sortAlphabeticallyIconClassNames, sortByDisplayOrderIconClassNames } from 'sql/workbench/contrib/queryplan2/browser/constants';
import { textFormatter } from 'sql/base/browser/ui/table/formatters';
export class QueryPlanPropertiesView {
@@ -96,7 +97,8 @@ export class QueryPlanPropertiesView {
field: 'name',
width: 250,
editor: Slick.Editors.Text,
headerCssClass: 'prop-table-header'
headerCssClass: 'prop-table-header',
formatter: textFormatter
},
{
id: 'value',
@@ -104,7 +106,8 @@ export class QueryPlanPropertiesView {
field: 'value',
width: 250,
editor: Slick.Editors.Text,
headerCssClass: 'prop-table-header'
headerCssClass: 'prop-table-header',
formatter: textFormatter
}
];
@@ -199,15 +202,16 @@ export class QueryPlanPropertiesView {
}
props.forEach((p, i) => {
let row = {};
row['name'] = '\t'.repeat(indent) + p.name;
rows.push(row);
row['name'] = ' '.repeat(indent) + p.name;
row['parent'] = parentIndex;
if (!isString(p.value)) {
row['value'] = '';
row['value'] = removeLineBreaks(p.displayValue, ' ');
this.convertPropertiesToTableRows(p.value, rows.length - 1, indent + 2, rows);
} else {
row['value'] = p.value;
row['value'] = removeLineBreaks(p.value, ' ');
row['tooltip'] = p.value;
}
rows.push(row);
});
return rows;
}