A few table designer improvements && bump STS to .227 (#18982)

* Add unified col for data type deit

* remove seperate type setting cols and rename unified col to 'type'

* remove advanced type from properties window

* add description to col, idx, constraints

* nit

* bump STS to .227
This commit is contained in:
Hai Cao
2022-04-08 15:00:56 -07:00
committed by GitHub
parent 4191ef8aa5
commit 0738c148ca
4 changed files with 66 additions and 8 deletions

View File

@@ -197,7 +197,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
reportNotificationHandle.close();
this.updateState(this.valid, this.dirty);
} catch (error) {
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.generatePreviewReportError', "An error occured while generating preview report: {0}", error?.message ?? error));
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.generatePreviewReportError', "An error occurred while generating preview report: {0}", error?.message ?? error));
this.updateState(this.valid, this.dirty);
this._adsTelemetryService.createErrorEvent(TelemetryView.TableDesigner, TelemetryAction.GeneratePreviewReport).withAdditionalProperties(telemetryInfo).send();
return;
@@ -253,7 +253,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
this.doInitialization(result);
this._onInitialized.fire();
}, error => {
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.errorInitializingTableDesigner', "An error occured while initializing the table designer: {0}", error?.message ?? error));
this._errorMessageService.showDialog(Severity.Error, ErrorDialogTitle, localize('tableDesigner.errorInitializingTableDesigner', "An error occurred while initializing the table designer: {0}", error?.message ?? error));
});
}
@@ -345,6 +345,23 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
title: localize('tableDesigner.columnNameTitle', "Name"),
width: 150
}
}, {
componentType: 'input',
propertyName: designers.TableColumnProperty.Description,
description: localize('designer.column.description.description', "Displays the description of the column"),
componentProperties: {
title: localize('tableDesigner.columnDescriptionTitle', "Description"),
}
}, {
componentType: 'dropdown',
propertyName: designers.TableColumnProperty.AdvancedType,
showInPropertiesView: false,
description: localize('designer.column.description.advancedType', "Displays the unified data type (including length, scale and precision) for the column"),
componentProperties: {
title: localize('tableDesigner.columnAdvancedTypeTitle', "Type"),
width: 120,
isEditable: true
}
}, {
componentType: 'dropdown',
propertyName: designers.TableColumnProperty.Type,
@@ -406,10 +423,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
const displayProperties = this.getTableDisplayProperties(options, [
designers.TableColumnProperty.Name,
designers.TableColumnProperty.Type,
designers.TableColumnProperty.Length,
designers.TableColumnProperty.Precision,
designers.TableColumnProperty.Scale,
designers.TableColumnProperty.AdvancedType,
designers.TableColumnProperty.IsPrimaryKey,
designers.TableColumnProperty.AllowNulls,
designers.TableColumnProperty.DefaultValue,
@@ -469,6 +483,14 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
width: 300
}
},
{
componentType: 'input',
propertyName: designers.TableForeignKeyProperty.Description,
description: localize('designer.foreignkey.description.description', "The description of the foreign key."),
componentProperties: {
title: localize('tableDesigner.foreignKeyDescriptionTitle', "Description"),
}
},
{
componentType: 'dropdown',
propertyName: designers.TableForeignKeyProperty.ForeignTable,
@@ -559,6 +581,15 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
componentProperties: {
title: localize('tableDesigner.primaryKeyNameTitle', "Name")
}
},
{
componentType: 'input',
propertyName: designers.TableProperty.PrimaryKeyDescription,
showInPropertiesView: false,
description: localize('designer.table.primaryKeyDescription.description', "The description of the primary key."),
componentProperties: {
title: localize('tableDesigner.primaryKeyDescriptionTitle', "Description"),
}
});
if (view.additionalPrimaryKeyProperties) {
view.additionalPrimaryKeyProperties.forEach(component => {
@@ -602,6 +633,13 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
title: localize('tableDesigner.checkConstraintNameTitle', "Name"),
width: 200
}
}, {
componentType: 'input',
propertyName: designers.TableCheckConstraintProperty.Description,
description: localize('designer.checkConstraint.description.description', "The description of the check constraint."),
componentProperties: {
title: localize('tableDesigner.checkConstraintDescriptionTitle', "Description"),
}
}, {
componentType: 'input',
propertyName: designers.TableCheckConstraintProperty.Expression,
@@ -656,6 +694,14 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
title: localize('tableDesigner.indexName', "Name"),
width: 200
}
}, {
componentType: 'input',
propertyName: designers.TableIndexProperty.Description,
description: localize('designer.index.description.description', "The description of the index."),
componentProperties: {
title: localize('tableDesigner.indexDescription', "Description"),
width: 200
}
}, {
componentType: 'table',
propertyName: designers.TableIndexProperty.Columns,