mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Remove some TODOs mostly for styling (#23934)
* Remove some TODOs mostly for styling * Remove unused
This commit is contained in:
@@ -26,7 +26,6 @@ import { IThemeService, IColorTheme } from 'vs/platform/theme/common/themeServic
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
|
||||
import { ServiceOptionType } from 'sql/platform/connection/common/interfaces';
|
||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { GroupHeaderBackground } from 'sql/platform/theme/common/colorRegistry';
|
||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
|
||||
@@ -75,16 +74,9 @@ export class OptionsDialog extends Modal {
|
||||
attachModalDialogStyler(this, this._themeService);
|
||||
if (this.backButton) {
|
||||
this.backButton.onDidClick(() => this.cancel());
|
||||
//styler.attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND });
|
||||
}
|
||||
// {{SQL CARBON TODO}} - theming
|
||||
this.addFooterButton(localize('optionsDialog.ok', "OK"), () => this.ok());
|
||||
this.addFooterButton(this.options.cancelLabel || localize('optionsDialog.cancel', "Cancel"), () => this.cancel(), 'right', true);
|
||||
// let okButton = this.addFooterButton(localize('optionsDialog.ok', "OK"), () => this.ok());
|
||||
// let closeButton = this.addFooterButton(this.options.cancelLabel || localize('optionsDialog.cancel', "Cancel"), () => this.cancel(), 'right', true);
|
||||
// Theme styler
|
||||
//styler.attachButtonStyler(okButton, this._themeService);
|
||||
//styler.attachButtonStyler(closeButton, this._themeService);
|
||||
this._register(this._themeService.onDidColorThemeChange(e => this.updateTheme(e)));
|
||||
this.updateTheme(this._themeService.getColorTheme());
|
||||
}
|
||||
@@ -135,25 +127,6 @@ export class OptionsDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
private registerStyling(): void {
|
||||
// Theme styler
|
||||
for (let optionName in this._optionElements) {
|
||||
// {{SQL CARBON TODO}} - styling
|
||||
//let widget: Widget = this._optionElements[optionName].optionWidget;
|
||||
let option = this._optionElements[optionName].option;
|
||||
switch (option.valueType) {
|
||||
case ServiceOptionType.category:
|
||||
case ServiceOptionType.boolean:
|
||||
//this.disposableStore.add(styler.attachSelectBoxStyler(<SelectBox>widget, this._themeService));
|
||||
break;
|
||||
case ServiceOptionType.string:
|
||||
case ServiceOptionType.password:
|
||||
case ServiceOptionType.number:
|
||||
//this.disposableStore.add(styler.attachInputBoxStyler(<InputBox>widget, this._themeService));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private get options(): IOptionsDialogOptions {
|
||||
return this._modalOptions as IOptionsDialogOptions;
|
||||
}
|
||||
@@ -215,7 +188,6 @@ export class OptionsDialog extends Modal {
|
||||
append(this._optionGroupsContainer!, bodyContainer);
|
||||
}
|
||||
this.updateTheme(this._themeService.getColorTheme());
|
||||
this.registerStyling();
|
||||
this.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@ export class ImageCalloutDialog extends Modal {
|
||||
|
||||
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
||||
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement) {
|
||||
@@ -194,12 +193,6 @@ export class ImageCalloutDialog extends Modal {
|
||||
}));
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
// {{SQL CARBON TODO}} - attach styles?
|
||||
// this._register(styler.attachInputBoxStyler(this._imageUrlInputBox, this._themeService));
|
||||
// this._register(styler.attachToggleStyler(this._imageEmbedCheckbox, this._themeService));
|
||||
}
|
||||
|
||||
public insert(): void {
|
||||
this.hide('ok');
|
||||
let imgPath = unquoteText(this._imageUrlInputBox.value);
|
||||
|
||||
@@ -96,7 +96,6 @@ export class LinkCalloutDialog extends Modal {
|
||||
|
||||
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
||||
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement) {
|
||||
@@ -141,12 +140,6 @@ export class LinkCalloutDialog extends Modal {
|
||||
DOM.append(linkAddressRow, linkAddressInputContainer);
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
// {{SQL CARBON TODO}} - apply styles
|
||||
// this._register(styler.attachInputBoxStyler(this._linkTextInputBox, this._themeService));
|
||||
// this._register(styler.attachInputBoxStyler(this._linkUrlInputBox, this._themeService));
|
||||
}
|
||||
|
||||
protected override onAccept(e?: StandardKeyboardEvent) {
|
||||
// EventHelper.stop() will call preventDefault. Without it, text cell will insert an extra newline when pressing enter on dialog
|
||||
DOM.EventHelper.stop(e, true);
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference
|
||||
import { FIND_IDS, CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/browser/findModel';
|
||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IEditorAction } from 'vs/editor/common/editorCommon';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { defaultInputBoxStyles, defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';
|
||||
@@ -159,9 +159,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
||||
|
||||
this._notebookController.addOverlayWidget(this);
|
||||
|
||||
this._applyTheme(themeService.getColorTheme());
|
||||
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
|
||||
|
||||
this.onkeyup(this._domNode, e => {
|
||||
if (e.equals(KeyCode.Escape)) {
|
||||
this._state.change({ isRevealed: false, searchScope: null }, false);
|
||||
@@ -299,23 +296,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
||||
}
|
||||
}
|
||||
|
||||
private _applyTheme(theme: IColorTheme) {
|
||||
// {{SQL CARBON TODO}} - reenable styles
|
||||
// let inputStyles: IFindInputStyles = {
|
||||
// inputActiveOptionBorder: theme.getColor(colors.inputActiveOptionBorder),
|
||||
// inputBackground: theme.getColor(colors.inputBackground),
|
||||
// inputForeground: theme.getColor(colors.inputForeground),
|
||||
// inputBorder: theme.getColor(colors.inputBorder),
|
||||
// inputValidationInfoBackground: theme.getColor(colors.inputValidationInfoBackground),
|
||||
// inputValidationInfoBorder: theme.getColor(colors.inputValidationInfoBorder),
|
||||
// inputValidationWarningBackground: theme.getColor(colors.inputValidationWarningBackground),
|
||||
// inputValidationWarningBorder: theme.getColor(colors.inputValidationWarningBorder),
|
||||
// inputValidationErrorBackground: theme.getColor(colors.inputValidationErrorBackground),
|
||||
// inputValidationErrorBorder: theme.getColor(colors.inputValidationErrorBorder)
|
||||
// };
|
||||
//this._findInput.style(inputStyles);
|
||||
}
|
||||
|
||||
// ----- Public
|
||||
|
||||
public focusFindInput(): void {
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Sash, ISashEvent, Orientation, IVerticalSashLayoutProvider } from 'vs/b
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IColorTheme, IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { IEditorAction } from 'vs/editor/common/editorCommon';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
||||
@@ -155,9 +155,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
||||
});
|
||||
|
||||
this._tableController.addOverlayWidget(this);
|
||||
|
||||
this._applyTheme(themeService.getColorTheme());
|
||||
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
|
||||
}
|
||||
|
||||
// ----- IOverlayWidget API
|
||||
@@ -290,23 +287,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
|
||||
}
|
||||
}
|
||||
|
||||
private _applyTheme(theme: IColorTheme) {
|
||||
// {{SQL CARBON TODO}} - styles
|
||||
// let inputStyles: IFindInputStyles = {
|
||||
// inputActiveOptionBorder: theme.getColor(colors.inputActiveOptionBorder),
|
||||
// inputBackground: theme.getColor(colors.inputBackground),
|
||||
// inputForeground: theme.getColor(colors.inputForeground),
|
||||
// inputBorder: theme.getColor(colors.inputBorder),
|
||||
// inputValidationInfoBackground: theme.getColor(colors.inputValidationInfoBackground),
|
||||
// inputValidationInfoBorder: theme.getColor(colors.inputValidationInfoBorder),
|
||||
// inputValidationWarningBackground: theme.getColor(colors.inputValidationWarningBackground),
|
||||
// inputValidationWarningBorder: theme.getColor(colors.inputValidationWarningBorder),
|
||||
// inputValidationErrorBackground: theme.getColor(colors.inputValidationErrorBackground),
|
||||
// inputValidationErrorBorder: theme.getColor(colors.inputValidationErrorBorder)
|
||||
// };
|
||||
// this._findInput.style(inputStyles);
|
||||
}
|
||||
|
||||
// ----- Public
|
||||
|
||||
public focusFindInput(): void {
|
||||
|
||||
@@ -111,9 +111,6 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
||||
}));
|
||||
|
||||
this._register(this.backButton);
|
||||
|
||||
// {{SQL CARBON TODO}} - style
|
||||
//this._register(attachButtonStyler(this.backButton, this._themeService, { buttonBackground: SIDE_BAR_BACKGROUND, buttonHoverBackground: SIDE_BAR_BACKGROUND }));
|
||||
}
|
||||
|
||||
let tableContainer: HTMLElement = DOM.append(DOM.append(this._body, DOM.$('.option-section')), DOM.$('table.url-table-content'));
|
||||
|
||||
Reference in New Issue
Block a user