implement the style for dropdown, inputbox and table filter (#23502)

* dropdown, inputbox, headerfilter styles

* fix missing reference

* remove unused import
This commit is contained in:
Alan Ren
2023-06-27 19:36:31 -07:00
committed by GitHub
parent f0d496d9ab
commit 4abcc20781
44 changed files with 155 additions and 559 deletions

View File

@@ -13,18 +13,16 @@ import { nb } from 'azdata';
import { localize } from 'vs/nls';
import { IInputOptions } from 'vs/base/browser/ui/inputbox/inputBox';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { inputBackground, inputBorder } from 'vs/platform/theme/common/colorRegistry';
import { asCssVariable, inputBackground, inputBorder } from 'vs/platform/theme/common/colorRegistry';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
import { attachInputBoxStyler } from 'sql/platform/theme/common/styler';
import { AngularDisposable } from 'sql/base/browser/lifecycle';
import { Deferred } from 'sql/base/common/promise';
import { ICellModel, CellExecutionState } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
import { defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles';
import { getInputBoxStyle } from 'vs/platform/theme/browser/defaultStyles';
export const STDIN_SELECTOR: string = 'stdin-component';
@Component({
@@ -44,7 +42,6 @@ export class StdInComponent extends AngularDisposable implements AfterViewInit {
constructor(
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IContextViewService) private contextViewService: IContextViewService
) {
super();
@@ -54,17 +51,16 @@ export class StdInComponent extends AngularDisposable implements AfterViewInit {
let inputOptions: IInputOptions = {
placeholder: '',
ariaLabel: this.prompt,
inputBoxStyles: defaultInputBoxStyles
inputBoxStyles: getInputBoxStyle({
inputValidationInfoBackground: asCssVariable(inputBackground),
inputValidationInfoBorder: asCssVariable(inputBorder)
})
};
this._input = new InputBox(this._inputContainer.nativeElement, this.contextViewService, inputOptions);
if (this.password) {
this._input.inputElement.type = 'password';
}
this._register(this._input);
this._register(attachInputBoxStyler(this._input, this.themeService, {
inputValidationInfoBackground: inputBackground,
inputValidationInfoBorder: inputBorder,
}));
if (this.cellModel) {
this._register(this.cellModel.onExecutionStateChange((status) => this.handleExecutionChange(status)));
}

View File

@@ -14,7 +14,6 @@ import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import * as DOM from 'vs/base/browser/dom';
import { attachInputBoxStyler } from 'sql/platform/theme/common/styler';
import { localize } from 'vs/nls';
import { IInputOptions, MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
@@ -99,8 +98,6 @@ export class ViewOptionsModal extends Modal {
this._submitButton = this.addFooterButton(localize('save', "Save"), () => this.onSubmitHandler());
this.addFooterButton(localize('cancel', "Cancel"), () => this.onCancelHandler(), 'right', true);
this._register(attachInputBoxStyler(this._viewNameInput!, this._themeService));
this._register(this._viewNameInput.onDidChange(v => this.validate()));
attachModalDialogStyler(this, this._themeService);

View File

@@ -241,7 +241,6 @@ class DataResourceTable extends GridTableBase<any> {
@IUntitledTextEditorService untitledEditorService: IUntitledTextEditorService,
@IConfigurationService configurationService: IConfigurationService,
@IQueryModelService queryModelService: IQueryModelService,
@IThemeService themeService: IThemeService,
@IContextViewService contextViewService: IContextViewService,
@INotificationService notificationService: INotificationService,
@IExecutionPlanService executionPlanService: IExecutionPlanService,
@@ -254,7 +253,7 @@ class DataResourceTable extends GridTableBase<any> {
super(state, createResultSet(source), {
actionOrientation: ActionsOrientation.HORIZONTAL,
inMemoryDataProcessing: true
}, contextMenuService, instantiationService, editorService, untitledEditorService, configurationService, queryModelService, themeService, contextViewService, notificationService, executionPlanService, accessibilityService, quickInputService, componentContextService, contextKeyService, logService);
}, contextMenuService, instantiationService, editorService, untitledEditorService, configurationService, queryModelService, contextViewService, notificationService, executionPlanService, accessibilityService, quickInputService, componentContextService, contextKeyService, logService);
this._gridDataProvider = this.instantiationService.createInstance(DataResourceDataProvider, source, this.resultSet, this.cellModel);
this._chart = this.instantiationService.createInstance(ChartView, false);