mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -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 { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||||
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
|
import { attachModalDialogStyler } from 'sql/workbench/common/styler';
|
||||||
import { ServiceOptionType } from 'sql/platform/connection/common/interfaces';
|
|
||||||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||||
import { GroupHeaderBackground } from 'sql/platform/theme/common/colorRegistry';
|
import { GroupHeaderBackground } from 'sql/platform/theme/common/colorRegistry';
|
||||||
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
|
import { ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration';
|
||||||
@@ -75,16 +74,9 @@ export class OptionsDialog extends Modal {
|
|||||||
attachModalDialogStyler(this, this._themeService);
|
attachModalDialogStyler(this, this._themeService);
|
||||||
if (this.backButton) {
|
if (this.backButton) {
|
||||||
this.backButton.onDidClick(() => this.cancel());
|
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(localize('optionsDialog.ok', "OK"), () => this.ok());
|
||||||
this.addFooterButton(this.options.cancelLabel || localize('optionsDialog.cancel', "Cancel"), () => this.cancel(), 'right', true);
|
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._register(this._themeService.onDidColorThemeChange(e => this.updateTheme(e)));
|
||||||
this.updateTheme(this._themeService.getColorTheme());
|
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 {
|
private get options(): IOptionsDialogOptions {
|
||||||
return this._modalOptions as IOptionsDialogOptions;
|
return this._modalOptions as IOptionsDialogOptions;
|
||||||
}
|
}
|
||||||
@@ -215,7 +188,6 @@ export class OptionsDialog extends Modal {
|
|||||||
append(this._optionGroupsContainer!, bodyContainer);
|
append(this._optionGroupsContainer!, bodyContainer);
|
||||||
}
|
}
|
||||||
this.updateTheme(this._themeService.getColorTheme());
|
this.updateTheme(this._themeService.getColorTheme());
|
||||||
this.registerStyling();
|
|
||||||
this.show();
|
this.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ export class ImageCalloutDialog extends Modal {
|
|||||||
|
|
||||||
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
||||||
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
||||||
this.registerListeners();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected renderBody(container: HTMLElement) {
|
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 {
|
public insert(): void {
|
||||||
this.hide('ok');
|
this.hide('ok');
|
||||||
let imgPath = unquoteText(this._imageUrlInputBox.value);
|
let imgPath = unquoteText(this._imageUrlInputBox.value);
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export class LinkCalloutDialog extends Modal {
|
|||||||
|
|
||||||
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
this.addFooterButton(constants.insertButtonText, () => this.insert());
|
||||||
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
this.addFooterButton(constants.cancelButtonText, () => this.cancel(), undefined, true);
|
||||||
this.registerListeners();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected renderBody(container: HTMLElement) {
|
protected renderBody(container: HTMLElement) {
|
||||||
@@ -141,12 +140,6 @@ export class LinkCalloutDialog extends Modal {
|
|||||||
DOM.append(linkAddressRow, linkAddressInputContainer);
|
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) {
|
protected override onAccept(e?: StandardKeyboardEvent) {
|
||||||
// EventHelper.stop() will call preventDefault. Without it, text cell will insert an extra newline when pressing enter on dialog
|
// EventHelper.stop() will call preventDefault. Without it, text cell will insert an extra newline when pressing enter on dialog
|
||||||
DOM.EventHelper.stop(e, true);
|
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 { FIND_IDS, CONTEXT_FIND_INPUT_FOCUSED } from 'vs/editor/contrib/find/browser/findModel';
|
||||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
||||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
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 { IEditorAction } from 'vs/editor/common/editorCommon';
|
||||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { defaultInputBoxStyles, defaultToggleStyles } from 'vs/platform/theme/browser/defaultStyles';
|
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._notebookController.addOverlayWidget(this);
|
||||||
|
|
||||||
this._applyTheme(themeService.getColorTheme());
|
|
||||||
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
|
|
||||||
|
|
||||||
this.onkeyup(this._domNode, e => {
|
this.onkeyup(this._domNode, e => {
|
||||||
if (e.equals(KeyCode.Escape)) {
|
if (e.equals(KeyCode.Escape)) {
|
||||||
this._state.change({ isRevealed: false, searchScope: null }, false);
|
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
|
||||||
|
|
||||||
public focusFindInput(): void {
|
public focusFindInput(): void {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { Sash, ISashEvent, Orientation, IVerticalSashLayoutProvider } from 'vs/b
|
|||||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||||
import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
|
import { IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser';
|
||||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
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 { IEditorAction } from 'vs/editor/common/editorCommon';
|
||||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/browser/findState';
|
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._tableController.addOverlayWidget(this);
|
||||||
|
|
||||||
this._applyTheme(themeService.getColorTheme());
|
|
||||||
this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- IOverlayWidget API
|
// ----- 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
|
||||||
|
|
||||||
public focusFindInput(): void {
|
public focusFindInput(): void {
|
||||||
|
|||||||
@@ -111,9 +111,6 @@ export class BackupRestoreUrlBrowserDialog extends Modal {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
this._register(this.backButton);
|
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'));
|
let tableContainer: HTMLElement = DOM.append(DOM.append(this._body, DOM.$('.option-section')), DOM.$('table.url-table-content'));
|
||||||
|
|||||||
@@ -38,32 +38,6 @@ export namespace ThemeIcon {
|
|||||||
|
|
||||||
const ThemeIconIdRegex = new RegExp(`^(${iconNameExpression})(${iconModifierExpression})?$`);
|
const ThemeIconIdRegex = new RegExp(`^(${iconNameExpression})(${iconModifierExpression})?$`);
|
||||||
|
|
||||||
|
|
||||||
// {{SQL CARBON TODO}} - do we need the edit block below
|
|
||||||
// export function asClassNameArray(icon: CSSIcon): string[] {
|
|
||||||
// if (icon instanceof Codicon) {
|
|
||||||
// return ['codicon', 'codicon-' + icon.id];
|
|
||||||
// }
|
|
||||||
// const match = cssIconIdRegex.exec(icon.id);
|
|
||||||
// if (!match) {
|
|
||||||
// return asClassNameArray(Codicon.error);
|
|
||||||
// }
|
|
||||||
// const [, id, modifier] = match;
|
|
||||||
|
|
||||||
// // {{SQL CARBON EDIT}} Modifying method to not add 'codicon' in front of sql carbon icons.
|
|
||||||
// let sqlCarbonIcons: string[] = [SqlIconId.activeConnectionsAction, SqlIconId.addServerAction, SqlIconId.addServerGroupAction, SqlIconId.serverPage];
|
|
||||||
// if (sqlCarbonIcons.includes(id)) {
|
|
||||||
// return ['codicon', id];
|
|
||||||
// // {{SQL CARBON EDIT}} End of edit
|
|
||||||
// } else {
|
|
||||||
// const classNames = ['codicon', 'codicon-' + id];
|
|
||||||
// if (modifier) {
|
|
||||||
// classNames.push('codicon-modifier-' + modifier.substr(1));
|
|
||||||
// }
|
|
||||||
// return classNames;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
export function asClassNameArray(icon: ThemeIcon): string[] {
|
export function asClassNameArray(icon: ThemeIcon): string[] {
|
||||||
const match = ThemeIconIdRegex.exec(icon.id);
|
const match = ThemeIconIdRegex.exec(icon.id);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
|
|||||||
@@ -1126,7 +1126,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi
|
|||||||
if (result) {
|
if (result) {
|
||||||
const r = result.results[0];
|
const r = result.results[0];
|
||||||
const galleryExtensions = r.extensions;
|
const galleryExtensions = r.extensions;
|
||||||
// {{SQL CARBON TODO}}
|
// {{SQL CARBON EDIT}}
|
||||||
galleryExtensions.forEach(e => sortExtensionVersions(e.versions, TargetPlatform.UNIVERSAL));
|
galleryExtensions.forEach(e => sortExtensionVersions(e.versions, TargetPlatform.UNIVERSAL));
|
||||||
// const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; {{SQL CARBON EDIT}} comment out for no unused
|
// const resultCount = r.resultMetadata && r.resultMetadata.filter(m => m.metadataType === 'ResultCount')[0]; {{SQL CARBON EDIT}} comment out for no unused
|
||||||
// const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; {{SQL CARBON EDIT}} comment out for no unused
|
// const total = resultCount && resultCount.metadataItems.filter(i => i.name === 'TotalCount')[0].count || 0; {{SQL CARBON EDIT}} comment out for no unused
|
||||||
|
|||||||
@@ -44,10 +44,6 @@ import { ILanguageService } from 'vs/editor/common/languages/language';
|
|||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
// {{SQL CARBON TODO}} - default theme?
|
|
||||||
// const DEFAULT_COLOR_THEME_ID = 'vs sql-theme-carbon-themes-light_carbon-json'; // {{SQL CARBON EDIT}}
|
|
||||||
// const DEFAULT_LIGHT_COLOR_THEME_ID = 'vs vscode-theme-defaults-themes-light_plus-json';
|
|
||||||
|
|
||||||
const PERSISTED_OS_COLOR_SCHEME = 'osColorScheme';
|
const PERSISTED_OS_COLOR_SCHEME = 'osColorScheme';
|
||||||
const PERSISTED_OS_COLOR_SCHEME_SCOPE = StorageScope.APPLICATION; // the OS scheme depends on settings in the OS
|
const PERSISTED_OS_COLOR_SCHEME_SCOPE = StorageScope.APPLICATION; // the OS scheme depends on settings in the OS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user