table component improvement (#13801)

* hyperlink column

* fixed width for image only button - old behavior
This commit is contained in:
Alan Ren
2020-12-14 20:28:43 -08:00
committed by GitHub
parent 1f630b9767
commit ae6494f3e4
25 changed files with 605 additions and 788 deletions

View File

@@ -5,7 +5,6 @@
import * as assert from 'assert';
import TableComponent from 'sql/workbench/browser/modelComponents/table.component';
import { CssIconCellValue } from 'sql/base/browser/ui/table/formatters';
import { NullLogService } from 'vs/platform/log/common/log';
suite('TableComponent Tests', () => {
@@ -22,7 +21,7 @@ suite('TableComponent Tests', () => {
let columns = ['c1', 'c2', 'c3'];
const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService());
let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns);
let actual = tableComponent.transformData(data, columns);
let expected: { [key: string]: string }[] = [
{
'c1': '1',
@@ -42,7 +41,7 @@ suite('TableComponent Tests', () => {
let data = undefined;
const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService());
let columns = ['c1', 'c2', 'c3'];
let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns);
let actual = tableComponent.transformData(data, columns);
let expected: { [key: string]: string }[] = [];
assert.deepEqual(actual, expected);
});
@@ -54,7 +53,7 @@ suite('TableComponent Tests', () => {
];
let columns;
const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService());
let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns);
let actual = tableComponent.transformData(data, columns);
let expected: { [key: string]: string }[] = [];
assert.deepEqual(actual, expected);
});
@@ -66,7 +65,7 @@ suite('TableComponent Tests', () => {
];
const tableComponent = new TableComponent(undefined, undefined, undefined, new NullLogService());
let columns = ['c1', 'c2', 'c3'];
let actual: { [key: string]: string | CssIconCellValue }[] = tableComponent.transformData(data, columns);
let actual = tableComponent.transformData(data, columns);
let expected: { [key: string]: string }[] = [
{
'c1': '1',