Add accessibility information to query history items (#20958)

* Add accessibility information to query history items

* bump version
This commit is contained in:
Charles Gagnon
2022-10-24 17:29:59 -07:00
committed by GitHub
parent 5032685162
commit 31bfc2fc94
3 changed files with 7 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
"name": "query-history",
"displayName": "%queryHistory.displayName%",
"description": "%queryHistory.description%",
"version": "0.5.1",
"version": "0.5.2",
"publisher": "Microsoft",
"preview": true,
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",

View File

@@ -6,5 +6,8 @@
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
export const succeeded = localize('succeeded', "Succeeded");
export const failed = localize('failed', "Failed");
export const errorLoading = (err: any): string => localize('errorLoading', "Error loading saved query history items. {0}", err.message ?? err);

View File

@@ -242,6 +242,9 @@ export class QueryHistoryProvider implements vscode.TreeDataProvider<QueryHistor
treeItem.tooltip = item.queryText;
treeItem.description = item.connectionProfile ? `${item.connectionProfile.serverName}|${item.connectionProfile.databaseName} ${item.timestamp}` : item.timestamp;
treeItem.command = { title: '', command: ITEM_SELECTED_COMMAND_ID, arguments: [item] };
treeItem.accessibilityInformation = {
label: `${item.isSuccess ? loc.succeeded : loc.failed} ${treeItem.description} ${item.queryText}`
}
return treeItem;
}