mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 17:23:40 -05:00
Adding screen reader optimized mode to slickgrid (#21069)
This commit is contained in:
@@ -26,6 +26,7 @@ import { IAction } from 'vs/base/common/actions';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import * as nls from 'vs/nls';
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { createAndFillInContextMenuActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { IMenuService, MenuId } from 'vs/platform/actions/common/actions';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -63,7 +64,8 @@ export class ExplorerTable extends Disposable {
|
||||
private readonly contextKeyService: IContextKeyService,
|
||||
private readonly progressService: IEditorProgressService,
|
||||
private readonly logService: ILogService,
|
||||
private readonly dashboardService: IDashboardService) {
|
||||
private readonly dashboardService: IDashboardService,
|
||||
readonly accessibilityService: IAccessibilityService) {
|
||||
super();
|
||||
this._explorerView = new ExplorerView(this.context);
|
||||
const connectionInfo = this.bootStrapService.connectionManagementService.connectionInfo;
|
||||
@@ -72,7 +74,7 @@ export class ExplorerTable extends Disposable {
|
||||
this._view = new TableDataView<Slick.SlickData>(undefined, undefined, undefined, (data: Slick.SlickData[]): Slick.SlickData[] => {
|
||||
return explorerFilter.filter(this._filterStr, data);
|
||||
});
|
||||
this._table = new Table<Slick.SlickData>(parentElement, { dataProvider: this._view }, { forceFitColumns: true });
|
||||
this._table = new Table<Slick.SlickData>(parentElement, accessibilityService, { dataProvider: this._view }, { forceFitColumns: true });
|
||||
this._table.setSelectionModel(new RowSelectionModel());
|
||||
this._actionsColumn = new ButtonColumn<Slick.SlickData>({
|
||||
id: 'actions',
|
||||
|
||||
@@ -31,6 +31,7 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { getFlavor } from 'sql/workbench/contrib/dashboard/browser/dashboardRegistry';
|
||||
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
|
||||
@Component({
|
||||
selector: 'explorer-widget',
|
||||
@@ -60,6 +61,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(IConnectionManagementService) private readonly connectionManagementService: IConnectionManagementService,
|
||||
@Inject(ICapabilitiesService) private readonly capabilitiesService: ICapabilitiesService,
|
||||
@Inject(IDashboardService) private readonly dashboardService: IDashboardService,
|
||||
@Inject(IAccessibilityService) private readonly accessibilityService: IAccessibilityService,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef
|
||||
) {
|
||||
super(changeRef);
|
||||
@@ -92,7 +94,8 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this.contextKeyService,
|
||||
this.progressService,
|
||||
this.logService,
|
||||
this.dashboardService);
|
||||
this.dashboardService,
|
||||
this.accessibilityService);
|
||||
this._register(this._input);
|
||||
this._register(attachInputBoxStyler(this._input, this.themeService));
|
||||
this._register(this._table);
|
||||
|
||||
@@ -14,6 +14,7 @@ import { TableDataView } from 'sql/base/browser/ui/table/tableDataView';
|
||||
import { attachTableStyler } from 'sql/platform/theme/common/styler';
|
||||
import { CellSelectionModel } from 'sql/base/browser/ui/table/plugins/cellSelectionModel.plugin';
|
||||
import { IInsightsView, IInsightData } from 'sql/platform/dashboard/browser/insightRegistry';
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
|
||||
@Component({
|
||||
template: ''
|
||||
@@ -25,7 +26,8 @@ export default class TableInsight extends Disposable implements IInsightsView, O
|
||||
|
||||
constructor(
|
||||
@Inject(forwardRef(() => ElementRef)) private _elementRef: ElementRef,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@Inject(IAccessibilityService) private accessibilityService: IAccessibilityService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@@ -61,7 +63,7 @@ export default class TableInsight extends Disposable implements IInsightsView, O
|
||||
|
||||
private createTable() {
|
||||
if (!this.table) {
|
||||
this.table = new Table(this._elementRef.nativeElement, { dataProvider: this.dataView, columns: this.columns }, { showRowNumber: true });
|
||||
this.table = new Table(this._elementRef.nativeElement, this.accessibilityService, { dataProvider: this.dataView, columns: this.columns }, { showRowNumber: true });
|
||||
this.table.setSelectionModel(new CellSelectionModel());
|
||||
this._register(attachTableStyler(this.table, this.themeService));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user