From edbab0e9889df426172eabdff1d51964edc8c1da Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 22 May 2017 18:03:50 -0700 Subject: [PATCH] Move default for expand docs to const --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index ac95a24f608..168d22bc846 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -33,6 +33,7 @@ import { registerColor, editorWidgetBackground, listFocusBackground, activeContr import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; const sticky = false; // for development purposes +const expandSuggestionDocsByDefault = false; interface ISuggestionTemplateData { root: HTMLElement; @@ -560,7 +561,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([index]); this.list.reveal(index); - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { this.showDetails(); this._ariaAlert(this.details.getAriaLabel()); @@ -609,7 +610,7 @@ export class SuggestWidget implements IContentWidget, IDelegate case State.Open: hide(this.messageElement); show(this.listElement); - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { show(this.details.element); this.expandSideOrBelow(); } else { @@ -797,7 +798,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.details.element.style.borderColor = this.detailsBorderColor; } } else if (this.state === State.Open - && this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + && this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { this.setState(State.Details); if (this.detailsFocusBorderColor) { this.details.element.style.borderColor = this.detailsFocusBorderColor; @@ -807,7 +808,7 @@ export class SuggestWidget implements IContentWidget, IDelegate toggleDetails(): void { - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { this.storageService.store('expandSuggestionDocs', false, StorageScope.GLOBAL); hide(this.details.element); removeClass(this.element, 'docs-side'); -- GitLab