diff --git a/src/sql/azdata.d.ts b/src/sql/azdata.d.ts index 70e2118490..1eb52054c3 100644 --- a/src/sql/azdata.d.ts +++ b/src/sql/azdata.d.ts @@ -2477,6 +2477,9 @@ declare module 'azdata' { flexContainer(): FlexBuilder; splitViewContainer(): SplitViewBuilder; dom(): ComponentBuilder; + /** + * @deprecated please use radioCardGroup component. + */ card(): ComponentBuilder; inputBox(): ComponentBuilder; checkBox(): ComponentBuilder; diff --git a/src/sql/workbench/api/common/extHostModelView.ts b/src/sql/workbench/api/common/extHostModelView.ts index d24c25cbeb..04a00dfa97 100644 --- a/src/sql/workbench/api/common/extHostModelView.ts +++ b/src/sql/workbench/api/common/extHostModelView.ts @@ -79,7 +79,12 @@ class ModelBuilderImpl implements azdata.ModelBuilder { return container; } + private cardDeprecationMessagePrinted = false; card(): azdata.ComponentBuilder { + if (!this.cardDeprecationMessagePrinted) { + console.warn(`Extension '${this._extension.identifier.value}' is using card component which has been replaced by radioCardGroup. the card component will be removed in a future release.`); + this.cardDeprecationMessagePrinted = true; + } let id = this.getNextComponentId(); let builder: ComponentBuilderImpl = this.getComponentBuilder(new CardWrapper(this._proxy, this._handle, id), id); this._componentBuilders.set(id, builder);