listbox and select box (#23504)

* listbox

* select box

* fix tests

* one more test
This commit is contained in:
Alan Ren
2023-06-28 11:20:31 -07:00
committed by GitHub
parent e52aa01cf0
commit 6dc1b9b905
31 changed files with 159 additions and 414 deletions

View File

@@ -11,7 +11,6 @@ import { Checkbox } from 'sql/base/browser/ui/checkbox/checkbox';
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
import { ListBox } from 'sql/base/browser/ui/listBox/listBox';
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
import { attachListBoxStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import * as BackupConstants from 'sql/workbench/contrib/backup/common/constants';
import { IBackupService, TaskExecutionMode } from 'sql/platform/backup/common/backupService';
@@ -38,7 +37,7 @@ import { IColorTheme } from 'vs/platform/theme/common/themeService';
import { DatabaseEngineEdition } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IBackupRestoreUrlBrowserDialogService } from 'sql/workbench/services/backupRestoreUrlBrowser/common/urlBrowserDialogService';
import { defaultButtonStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
import { defaultCheckboxStyles } from 'sql/platform/theme/browser/defaultStyles';
import { defaultCheckboxStyles, defaultListBoxStyles, defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
export const BACKUP_SELECTOR: string = 'backup-component';
@@ -241,7 +240,7 @@ export class BackupComponent extends AngularDisposable {
inputBoxStyles: defaultInputBoxStyles
}));
// Set backup type
this.backupTypeSelectBox = this._register(new SelectBox([], '', this.contextViewService, undefined, { ariaLabel: this.localizedStrings.BACKUP_TYPE }));
this.backupTypeSelectBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: this.localizedStrings.BACKUP_TYPE }));
this.backupTypeSelectBox.render(this.backupTypeElement!.nativeElement);
// Set copy-only check box
@@ -311,7 +310,10 @@ export class BackupComponent extends AngularDisposable {
}));
this._register(this.urlInputBox.onDidChange((value) => this.onUrlInputBoxChanged(value)));
this.pathListBox = this._register(new ListBox([], this.contextViewService));
this.pathListBox = this._register(new ListBox({
items: [],
...defaultListBoxStyles
}, this.contextViewService));
this.pathListBox.setAriaLabel(LocalizedStrings.BACKUP_DEVICE);
this._register(this.pathListBox.onKeyDown(e => {
if (this.pathListBox!.selectedOptions.length > 0) {
@@ -345,13 +347,13 @@ export class BackupComponent extends AngularDisposable {
this.removeFilePathButton.title = localize('removeFile', "Remove files");
// Set compression
this.compressionSelectBox = this._register(new SelectBox(this.compressionOptions, this.compressionOptions[0], this.contextViewService, undefined, { ariaLabel: this.localizedStrings.SET_BACKUP_COMPRESSION }));
this.compressionSelectBox = this._register(new SelectBox(this.compressionOptions, this.compressionOptions[0], defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: this.localizedStrings.SET_BACKUP_COMPRESSION }));
this.compressionSelectBox.render(this.compressionElement!.nativeElement);
// Set encryption
this.algorithmSelectBox = this._register(new SelectBox(this.encryptionAlgorithms, this.encryptionAlgorithms[0], this.contextViewService, undefined, { ariaLabel: this.localizedStrings.ALGORITHM }));
this.algorithmSelectBox = this._register(new SelectBox(this.encryptionAlgorithms, this.encryptionAlgorithms[0], defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: this.localizedStrings.ALGORITHM }));
this.algorithmSelectBox.render(this.encryptionAlgorithmElement!.nativeElement);
this.encryptorSelectBox = this._register(new SelectBox([], '', this.contextViewService, undefined, { ariaLabel: this.localizedStrings.CERTIFICATE_OR_ASYMMETRIC_KEY }));
this.encryptorSelectBox = this._register(new SelectBox([], '', defaultSelectBoxStyles, this.contextViewService, undefined, { ariaLabel: this.localizedStrings.CERTIFICATE_OR_ASYMMETRIC_KEY }));
this.encryptorSelectBox.render(this.encryptorElement!.nativeElement);
// Set media
@@ -605,13 +607,6 @@ export class BackupComponent extends AngularDisposable {
}
private registerListeners(): void {
// Theme styler
this._register(attachSelectBoxStyler(this.backupTypeSelectBox!, this.themeService));
this._register(attachListBoxStyler(this.pathListBox!, this.themeService));
this._register(attachSelectBoxStyler(this.compressionSelectBox!, this.themeService));
this._register(attachSelectBoxStyler(this.algorithmSelectBox!, this.themeService));
this._register(attachSelectBoxStyler(this.encryptorSelectBox!, this.themeService));
this._register(this.backupTypeSelectBox!.onDidSelect(selected => this.onBackupTypeChanged()));
this._register(this.addUrlPathButton!.onDidClick(() => this.onAddUrlClick()));
this._register(this.addFilePathButton!.onDidClick(() => this.onAddFileClick()));

View File

@@ -25,11 +25,10 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { Registry } from 'vs/platform/registry/common/platform';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ChartOptions, ControlType, IChartOption } from './chartOptions';
import { Insight } from './insight';
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const insightRegistry = Registry.as<IInsightRegistry>(Extensions.InsightContribution);
@@ -89,7 +88,6 @@ export class ChartView extends Disposable implements IPanelView {
constructor(
private readonly _isQueryEditorChart: boolean,
@IContextViewService private _contextViewService: IContextViewService,
@IThemeService private _themeService: IThemeService,
@IInstantiationService private _instantiationService: IInstantiationService,
@INotificationService private readonly _notificationService: INotificationService,
@IConfigurationService private readonly _configurationService: IConfigurationService
@@ -347,7 +345,7 @@ export class ChartView extends Disposable implements IPanelView {
break;
case ControlType.combo:
//pass options into changeAltNames in order for SelectBox to show user-friendly names.
let dropdown = new SelectBox(option.displayableOptions || this.changeToAltNames(option.options!), undefined!, this._contextViewService);
let dropdown = new SelectBox(option.displayableOptions || this.changeToAltNames(option.options!), undefined!, defaultSelectBoxStyles, this._contextViewService);
dropdown.setAriaLabel(option.label);
dropdown.select(option.options!.indexOf(value));
dropdown.render(optionInput);
@@ -364,7 +362,6 @@ export class ChartView extends Disposable implements IPanelView {
dropdown.select(option.options!.indexOf(val));
}
};
this.optionDisposables.push(attachSelectBoxStyler(dropdown, this._themeService));
break;
case ControlType.input:
let input = new InputBox(optionInput, this._contextViewService, {

View File

@@ -43,5 +43,5 @@ function createChartView(isQueryEditorChart: boolean): ChartView {
const notificationService = new TestNotificationService();
const configurationService = new TestConfigurationService();
instantiationService.stub(IThemeService, themeService);
return new ChartView(isQueryEditorChart, contextViewService, themeService, instantiationService, notificationService, configurationService);
return new ChartView(isQueryEditorChart, contextViewService, instantiationService, notificationService, configurationService);
}

View File

@@ -14,9 +14,8 @@ import * as dom from 'vs/base/browser/dom';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { INotificationService } from 'vs/platform/notification/common/notification';
import Severity from 'vs/base/common/severity';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const $ = dom.$;
/**
@@ -158,17 +157,14 @@ export class ChangeMaxRowsActionItem extends Disposable implements IActionViewIt
constructor(
private _editor: EditDataEditor,
public action: IAction,
@IContextViewService contextViewService: IContextViewService,
@IThemeService private _themeService: IThemeService) {
@IContextViewService contextViewService: IContextViewService) {
super();
this._options = ['200', '1000', '10000'];
this._currentOptionsIndex = 0;
this.selectBox = new SelectBox(this._options, this._options[this._currentOptionsIndex], contextViewService);
this.selectBox = new SelectBox(this._options, this._options[this._currentOptionsIndex], defaultSelectBoxStyles, contextViewService);
this._registerListeners();
this._refreshOptions();
this.defaultRowCount = Number(this._options[this._currentOptionsIndex]);
this._register(attachSelectBoxStyler(this.selectBox, _themeService));
}
public render(container: HTMLElement): void {
@@ -213,7 +209,6 @@ export class ChangeMaxRowsActionItem extends Disposable implements IActionViewIt
this._currentOptionsIndex = this._options.findIndex(x => x === selection.selected);
this._editor.editDataInput.onRowDropDownSet(Number(selection.selected));
}));
this._register(attachSelectBoxStyler(this.selectBox, this._themeService));
}
}

View File

@@ -15,7 +15,7 @@ import { Action } from 'vs/base/common/actions';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IColorTheme, ICssStyleCollector, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { IColorTheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import * as DOM from 'vs/base/browser/dom';
import { ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar';
import { localize } from 'vs/nls';
@@ -26,7 +26,6 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import { LoadingSpinner } from 'sql/base/browser/ui/loadingSpinner/loadingSpinner';
import { contrastBorder, editorWidgetBackground, errorForeground, listHoverBackground, textLinkForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
import { ExecutionPlanViewHeader } from 'sql/workbench/contrib/executionPlan/browser/executionPlanViewHeader';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
import { generateUuid } from 'vs/base/common/uuid';
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
@@ -35,6 +34,7 @@ import { NodeSearchWidget } from 'sql/workbench/contrib/executionPlan/browser/wi
import { Button } from 'sql/base/browser/ui/button/button';
import { Disposable } from 'vs/base/common/lifecycle';
import { defaultButtonStyles } from 'vs/platform/theme/browser/defaultStyles';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const ADD_EXECUTION_PLAN_STRING = localize('epCompare.addExecutionPlanLabel', 'Add execution plan');
@@ -126,7 +126,6 @@ export class ExecutionPlanComparisonEditorView extends Disposable {
constructor(
parentContainer: HTMLElement,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IThemeService private themeService: IThemeService,
@IExecutionPlanService private _executionPlanService: IExecutionPlanService,
@IFileDialogService private _fileDialogService: IFileDialogService,
@IContextViewService readonly contextViewService: IContextViewService,
@@ -235,7 +234,7 @@ export class ExecutionPlanComparisonEditorView extends Disposable {
this._topPlanContainer = DOM.$('.plan-container');
this.planSplitViewContainer.appendChild(this._topPlanContainer);
this._topPlanDropdownContainer = DOM.$('.dropdown-container');
this._topPlanDropdown = this._register(new SelectBox(['option 1', 'option2'], 'option1', this.contextViewService, this._topPlanDropdownContainer));
this._topPlanDropdown = this._register(new SelectBox(['option 1', 'option2'], 'option1', defaultSelectBoxStyles, this.contextViewService, this._topPlanDropdownContainer));
this._topPlanDropdown.render(this._topPlanDropdownContainer);
this._register(this._topPlanDropdown.onDidSelect(async (e) => {
@@ -253,7 +252,7 @@ export class ExecutionPlanComparisonEditorView extends Disposable {
await this.getSkeletonNodes();
}));
this._register(attachSelectBoxStyler(this._topPlanDropdown, this.themeService));
this._topPlanContainer.appendChild(this._topPlanDropdownContainer);
this._topPlanRecommendations = this._register(this._instantiationService.createInstance(ExecutionPlanViewHeader, this._topPlanContainer, undefined));
@@ -262,7 +261,7 @@ export class ExecutionPlanComparisonEditorView extends Disposable {
this._bottomPlanContainer = DOM.$('.plan-container');
this.planSplitViewContainer.appendChild(this._bottomPlanContainer);
this._bottomPlanDropdownContainer = DOM.$('.dropdown-container');
this._bottomPlanDropdown = this._register(new SelectBox(['option 1', 'option2'], 'option1', this.contextViewService, this._bottomPlanDropdownContainer));
this._bottomPlanDropdown = this._register(new SelectBox(['option 1', 'option2'], 'option1', defaultSelectBoxStyles, this.contextViewService, this._bottomPlanDropdownContainer));
this._bottomPlanDropdown.render(this._bottomPlanDropdownContainer);
this._register(this._bottomPlanDropdown.onDidSelect(async (e) => {
@@ -280,8 +279,6 @@ export class ExecutionPlanComparisonEditorView extends Disposable {
await this.getSkeletonNodes();
}));
this._register(attachSelectBoxStyler(this._bottomPlanDropdown, this.themeService));
this._bottomPlanContainer.appendChild(this._bottomPlanDropdownContainer);
this._bottomPlanRecommendations = this._register(this._instantiationService.createInstance(ExecutionPlanViewHeader, this._bottomPlanContainer, undefined));
}

View File

@@ -10,7 +10,6 @@ import { localize } from 'vs/nls';
import * as errors from 'vs/base/common/errors';
import { Codicon } from 'vs/base/common/codicons';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { Action } from 'vs/base/common/actions';
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
@@ -23,6 +22,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { ThemeIcon } from 'vs/base/common/themables';
import { defaultButtonStyles } from 'vs/platform/theme/browser/defaultStyles';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const SELECT_EXPENSE_METRIC_TITLE = localize('executionPlanSelectExpenseMetricTitle', 'Select expense metric');
@@ -86,11 +86,10 @@ export class HighlightExpensiveOperationWidget extends ExecutionPlanWidgetBase {
this.container.appendChild(this._expenseMetricSelectBoxContainer);
const selectBoxOptions = this.getSelectBoxOptionsFromExecutionPlanDiagram();
this.expenseMetricSelectBox = this._register(new SelectBox(selectBoxOptions, COST_STRING, this.contextViewService, this._expenseMetricSelectBoxContainer));
this.expenseMetricSelectBox = this._register(new SelectBox(selectBoxOptions, COST_STRING, defaultSelectBoxStyles, this.contextViewService, this._expenseMetricSelectBoxContainer));
this.expenseMetricSelectBox.setAriaLabel(SELECT_EXPENSE_METRIC_TITLE);
this.expenseMetricSelectBox.render(this._expenseMetricSelectBoxContainer);
this._register(attachSelectBoxStyler(this.expenseMetricSelectBox, this.themeService));
this._expenseMetricSelectBoxContainer.style.width = '200px';
this._expenseMetricSelectBoxContainer.style.marginRight = '5px';

View File

@@ -10,7 +10,6 @@ import * as DOM from 'vs/base/browser/dom';
import { localize } from 'vs/nls';
import { Codicon } from 'vs/base/common/codicons';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { Action } from 'vs/base/common/actions';
import { SelectBox } from 'sql/base/browser/ui/selectBox/selectBox';
@@ -19,6 +18,7 @@ import { AzdataGraphView, SearchType } from 'sql/workbench/contrib/executionPlan
import { ExecutionPlanWidgetController } from 'sql/workbench/contrib/executionPlan/browser/executionPlanWidgetController';
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
import { ThemeIcon } from 'vs/base/common/themables';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const SELECT_PROPERTY_TITLE = localize('executionPlanSelectPropertyTitle', 'Select property');
const SELECT_SEARCH_TYPE_TITLE = localize('executionPlanSelectSearchTypeTitle', 'Select search type');
@@ -71,9 +71,8 @@ export class NodeSearchWidget extends ExecutionPlanWidgetBase {
this._propertyNameSelectBoxContainer.style.width = '120px';
const propDropdownOptions = this._executionPlanDiagram.getUniqueElementProperties();
this._propertyNameSelectBox = this._register(new SelectBox(propDropdownOptions, propDropdownOptions[0], this.contextViewService, this._propertyNameSelectBoxContainer));
this._propertyNameSelectBox = this._register(new SelectBox(propDropdownOptions, propDropdownOptions[0], defaultSelectBoxStyles, this.contextViewService, this._propertyNameSelectBoxContainer));
this._propertyNameSelectBox.setAriaLabel(SELECT_PROPERTY_TITLE);
this._register(attachSelectBoxStyler(this._propertyNameSelectBox, this.themeService));
this._propertyNameSelectBox.render(this._propertyNameSelectBoxContainer);
this._register(this._propertyNameSelectBox.onDidSelect(e => {
@@ -93,10 +92,9 @@ export class NodeSearchWidget extends ExecutionPlanWidgetBase {
GREATER_EQUAL_DISPLAY_STRING,
LESSER_EQUAL_DISPLAY_STRING,
LESSER_AND_GREATER_DISPLAY_STRING
], EQUALS_DISPLAY_STRING, this.contextViewService, this._searchTypeSelectBoxContainer));
], EQUALS_DISPLAY_STRING, defaultSelectBoxStyles, this.contextViewService, this._searchTypeSelectBoxContainer));
this._searchTypeSelectBox.setAriaLabel(SELECT_SEARCH_TYPE_TITLE);
this._searchTypeSelectBox.render(this._searchTypeSelectBoxContainer);
this._register(attachSelectBoxStyler(this._searchTypeSelectBox, this.themeService));
this._register(this._searchTypeSelectBox.onDidSelect(e => {
this._usePreviousSearchResult = false;

View File

@@ -13,7 +13,6 @@ import { localize } from 'vs/nls';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
import { MenuId, IMenuService, MenuItemAction } from 'vs/platform/actions/common/actions';
import { IAction, Action, SubmenuAction } from 'vs/base/common/actions';
import { IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
@@ -508,13 +507,11 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
let kernelContainer = document.createElement('li');
let kernelDropdown = this.instantiationService.createInstance(KernelsDropdown, kernelContainer, this.contextViewService, this.modelReady);
kernelDropdown.render(kernelContainer);
attachSelectBoxStyler(kernelDropdown, this.themeService);
let attachToContainer = document.createElement('li');
let attachToDropdown = new AttachToDropdown(attachToContainer, this.contextViewService, this.modelReady,
this.connectionManagementService, this.connectionDialogService, this.notificationService, this.capabilitiesService, this._configurationService);
attachToDropdown.render(attachToContainer);
attachSelectBoxStyler(attachToDropdown, this.themeService);
let spacerElement = document.createElement('li');
spacerElement.style.marginLeft = 'auto';

View File

@@ -44,6 +44,7 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { Action2 } from 'vs/platform/actions/common/actions';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
const msgLoading = localize('loading', "Loading kernels...");
export const msgChanging = localize('changing', "Changing kernel...");
@@ -600,7 +601,7 @@ export class KernelsDropdown extends SelectBox {
private _showAllKernels: boolean = false;
constructor(container: HTMLElement, contextViewProvider: IContextViewProvider, modelReady: Promise<INotebookModel>, @IConfigurationService private _configurationService: IConfigurationService,
) {
super([msgLoading], msgLoading, contextViewProvider, container, { labelText: kernelLabel, labelOnTop: false, ariaLabel: kernelLabel, id: kernelDropdownElementId } as ISelectBoxOptionsWithLabel);
super([msgLoading], msgLoading, defaultSelectBoxStyles, contextViewProvider, container, { labelText: kernelLabel, labelOnTop: false, ariaLabel: kernelLabel, id: kernelDropdownElementId } as ISelectBoxOptionsWithLabel);
if (modelReady) {
modelReady
@@ -691,7 +692,7 @@ export class AttachToDropdown extends SelectBox {
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
@IConfigurationService private _configurationService: IConfigurationService
) {
super([msgLoadingContexts], msgLoadingContexts, contextViewProvider, container, { labelText: attachToLabel, labelOnTop: false, ariaLabel: attachToLabel, id: attachToDropdownElementId } as ISelectBoxOptionsWithLabel);
super([msgLoadingContexts], msgLoadingContexts, defaultSelectBoxStyles, contextViewProvider, container, { labelText: attachToLabel, labelOnTop: false, ariaLabel: attachToLabel, id: attachToDropdownElementId } as ISelectBoxOptionsWithLabel);
if (modelReady) {
modelReady
.then(model => {

View File

@@ -30,7 +30,6 @@ import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import * as types from 'vs/base/common/types';
import { attachSelectBoxStyler } from 'sql/platform/theme/common/vsstyler';
import { ColorScheme } from 'vs/platform/theme/common/theme';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IStorageService } from 'vs/platform/storage/common/storage';
@@ -57,6 +56,7 @@ import { CommonFindController, FindStartFocusAction } from 'vs/editor/contrib/fi
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
import { IComponentContextService } from 'sql/workbench/services/componentContext/browser/componentContextService';
import { defaultSelectBoxStyles } from 'sql/platform/theme/browser/defaultStyles';
class BasicView implements IView {
public get element(): HTMLElement {
@@ -255,7 +255,7 @@ export class ProfilerEditor extends EditorPane {
this._clearFilterAction = this._instantiationService.createInstance(Actions.ProfilerClearSessionFilter, Actions.ProfilerClearSessionFilter.ID, Actions.ProfilerClearSessionFilter.LABEL);
this._clearFilterAction.enabled = true;
this._viewTemplates = this._profilerService.getViewTemplates();
this._viewTemplateSelector = new SelectBox(this._viewTemplates.map(i => i.name), 'Standard View', this._contextViewService);
this._viewTemplateSelector = new SelectBox(this._viewTemplates.map(i => i.name), 'Standard View', defaultSelectBoxStyles, this._contextViewService);
this._viewTemplateSelector.setAriaLabel(nls.localize('profiler.viewSelectAccessibleName', "Select View"));
this._register(this._viewTemplateSelector.onDidSelect(e => {
if (this.input) {
@@ -268,7 +268,7 @@ export class ProfilerEditor extends EditorPane {
this._viewTemplateSelector.render(viewTemplateContainer);
this._sessionsList = [''];
this._sessionSelector = new SelectBox(this._sessionsList, '', this._contextViewService);
this._sessionSelector = new SelectBox(this._sessionsList, '', defaultSelectBoxStyles, this._contextViewService);
this._sessionSelector.setAriaLabel(nls.localize('profiler.sessionSelectAccessibleName', "Select Session"));
this._register(this._sessionSelector.onDidSelect(e => {
if (this.input) {
@@ -281,9 +281,6 @@ export class ProfilerEditor extends EditorPane {
sessionsContainer.style.paddingRight = '5px';
this._sessionSelector.render(sessionsContainer);
this._register(attachSelectBoxStyler(this._viewTemplateSelector, this.themeService));
this._register(attachSelectBoxStyler(this._sessionSelector, this.themeService));
this._actionBar.setContent([
{ action: this._createAction },
{ element: Taskbar.createTaskbarSeparator() },