From b0388ef2c3cbb3613fe2cd58bacc829d75f83fca Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 8 Mar 2023 11:54:32 -0800 Subject: [PATCH 01/10] Initial modal dialog commit --- src/vs/base/browser/ui/dialog/dialog.ts | 2 + src/vs/workbench/browser/web.api.ts | 43 ++++++- .../welcomeModalDialog.contribution.ts | 46 ++++++++ .../modalDialog/browser/media/modalDialog.css | 26 +++++ .../modalDialog/browser/modalDialogService.ts | 107 ++++++++++++++++++ 5 files changed, 222 insertions(+), 2 deletions(-) create mode 100644 src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts create mode 100644 src/vs/workbench/services/modalDialog/browser/media/modalDialog.css create mode 100644 src/vs/workbench/services/modalDialog/browser/modalDialogService.ts diff --git a/src/vs/base/browser/ui/dialog/dialog.ts b/src/vs/base/browser/ui/dialog/dialog.ts index 6392ec535e788..d7fc96598f137 100644 --- a/src/vs/base/browser/ui/dialog/dialog.ts +++ b/src/vs/base/browser/ui/dialog/dialog.ts @@ -375,6 +375,8 @@ export class Dialog extends Disposable { this.iconElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.loading), spinModifierClassName); break; case 'none': + this.iconElement.classList.add('no-codicon'); + break; case 'info': case 'question': default: diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index dae4352cc13a4..e7f9ffe4954e0 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -314,6 +314,11 @@ export interface IWorkbenchConstructionOptions { */ readonly initialColorTheme?: IInitialColorTheme; + /** + * Welcome view modal doalog on first launch. Can be dismissed by the user. + */ + readonly welcomeModalDialog?: IWelcomeModalDialog; + //#endregion @@ -510,10 +515,10 @@ export interface IWelcomeBanner { /** * Optional actions to appear as links after the welcome banner message. */ - actions?: IWelcomeBannerAction[]; + actions?: IWelcomeLinkAction[]; } -export interface IWelcomeBannerAction { +export interface IWelcomeLinkAction { /** * The link to open when clicking. Supports command invocation when @@ -578,6 +583,40 @@ export interface IInitialColorTheme { readonly colors?: { [colorId: string]: string }; } +export interface IWelcomeModalDialog { + + /** + * Route id. + */ + routeId: string; + + /** + * Title of the modal dialog. + */ + title: string; + + /** + * Button text of the modal dialog. + */ + buttonText: string; + + /** + * Main message text and icon for the modal dialog. + */ + mainMessage: { message: string; icon: string }; + + + /** + * Secondary message text and icon for the modal dialog. + */ + secondaryMessage: { message: string; icon: string }; + + /** + * Optional action to appear as links at the bottom of the modal dialog. + */ + action?: IWelcomeLinkAction; +} + export interface IDefaultView { /** diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts new file mode 100644 index 0000000000000..be1a4e6e05c16 --- /dev/null +++ b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle'; +import { Registry } from 'vs/platform/registry/common/platform'; +import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; +import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; +import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; +import { ThemeIcon } from 'vs/base/common/themables'; +import { IModalDialogService } from 'vs/workbench/services/modalDialog/browser/modalDialogService'; + +class WelcomeModalContribution { + + private static readonly WELCOME_MODAL_DIALOG_DISMISSED_KEY = 'workbench.modal.dialog.welcome.dismissed'; + + constructor( + @IModalDialogService modalDialogService: IModalDialogService, + @IStorageService storageService: IStorageService, + @IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService + ) { + const modalDialog = environmentService.options?.welcomeModalDialog; + if (!modalDialog) { + return; + } + + if (storageService.getBoolean(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + modalDialog.routeId, StorageScope.PROFILE, false)) { + return; + } + + modalDialogService.show({ + title: modalDialog.title, + buttonText: modalDialog.buttonText, + mainMessage: { message: modalDialog.mainMessage.message, icon: ThemeIcon.fromId(modalDialog.mainMessage.icon) }, + secondaryMessage: { message: modalDialog.secondaryMessage.message, icon: ThemeIcon.fromId(modalDialog.secondaryMessage.icon) }, + action: modalDialog.action, + onClose: () => { + storageService.store(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + modalDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); + } + }); + } +} + +Registry.as(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(WelcomeModalContribution, LifecyclePhase.Restored); diff --git a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css new file mode 100644 index 0000000000000..1dbfb46df9998 --- /dev/null +++ b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + + .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-item .icon-widget{ + padding-right: 8px; + max-width: 20px; + max-height: 20px; + position: relative; + top: auto; +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-item { + display: flex; + padding: 10px 0 20px 12px; + margin: 0; + min-height: auto; + border: 1px solid var(--vscode-welcomePage-tileBorder); + color: var(--vscode-descriptionForeground); +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body>.modal-dialog-item { + grid-area: title; + align-self: flex-end; +} diff --git a/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts b/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts new file mode 100644 index 0000000000000..9bdd1906a066f --- /dev/null +++ b/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts @@ -0,0 +1,107 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import 'vs/css!./media/modalDialog'; +import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { ThemeIcon } from 'vs/base/common/themables'; +import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; +import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; +import { DisposableStore } from 'vs/base/common/lifecycle'; +import { Dialog } from 'vs/base/browser/ui/dialog/dialog'; +import { defaultButtonStyles, defaultCheckboxStyles, defaultDialogStyles, defaultInputBoxStyles } from 'vs/platform/theme/browser/defaultStyles'; +import { $ } from 'vs/base/browser/dom'; +import { renderLabelWithIcons } from 'vs/base/browser/ui/iconLabel/iconLabels'; +import { ILinkDescriptor, Link } from 'vs/platform/opener/browser/link'; + +export interface IModalDialogItem { + readonly title: string; + readonly mainMessage: { message: string; icon: ThemeIcon }; + readonly secondaryMessage: { message: string; icon: ThemeIcon }; + readonly buttonText: string; + readonly action?: ILinkDescriptor; + readonly onClose?: () => void; +} + +export const IModalDialogService = createDecorator('modalDialogService'); + +export interface IModalDialogService { + readonly _serviceBrand: undefined; + + show(item: IModalDialogItem): void; +} + +export class ModalDialogService implements IModalDialogService { + declare readonly _serviceBrand: undefined; + + private dialog: Dialog | undefined; + private disposableStore: DisposableStore = new DisposableStore(); + + constructor( + @ILayoutService private readonly layoutService: ILayoutService, + @IInstantiationService private readonly instantiationService: IInstantiationService,) { + } + + private static iconWidgetFor(icon: ThemeIcon) { + if (icon) { + const widget = $(ThemeIcon.asCSSSelector(icon)); + widget.classList.add('icon-widget'); + return widget; + } + return ''; + } + + async show(modalDialogItem: IModalDialogItem): Promise { + + this.disposableStore.clear(); + + const renderBody = (parent: HTMLElement) => { + + parent.classList.add(...('modal-dialog-items')); + const mainDescriptorComponent = + $('.modal-dialog-mainmessage', + {}, + ModalDialogService.iconWidgetFor(modalDialogItem.mainMessage.icon), + $('.description-container', {}, + $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(modalDialogItem.mainMessage.message)))); + parent.appendChild(mainDescriptorComponent); + + const secondaryDescriptorComponent = + $('.modal-dialog-secondaryMessage', + {}, + ModalDialogService.iconWidgetFor(modalDialogItem.secondaryMessage.icon), + $('.description-container', {}, + $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(modalDialogItem.secondaryMessage.message)))); + + parent.appendChild(secondaryDescriptorComponent); + + const actionsContainer = $('div.modal-dialog-action-container'); + parent.appendChild(actionsContainer); + if (modalDialogItem.action) { + this.disposableStore.add(this.instantiationService.createInstance(Link, actionsContainer, modalDialogItem.action, {})); + } + }; + + this.dialog = new Dialog( + this.layoutService.container, + modalDialogItem.title, + [modalDialogItem.buttonText], + { + detail: '', + type: 'none', + renderBody: renderBody, + buttonStyles: defaultButtonStyles, + checkboxStyles: defaultCheckboxStyles, + inputBoxStyles: defaultInputBoxStyles, + dialogStyles: defaultDialogStyles + }); + + this.disposableStore.add(this.dialog); + await this.dialog.show(); + this.disposableStore.dispose(); + } +} + +registerSingleton(IModalDialogService, ModalDialogService, InstantiationType.Eager); + From 5c6f698fe17b89749c428e78a5a5a730c44c3e8e Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 8 Mar 2023 15:43:10 -0800 Subject: [PATCH 02/10] Fix up css --- src/vs/workbench/browser/web.api.ts | 10 +---- .../welcomeModalDialog.contribution.ts | 4 +- .../modalDialog/browser/media/modalDialog.css | 35 +++++++++++++---- .../modalDialog/browser/modalDialogService.ts | 38 +++++++++---------- 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index e7f9ffe4954e0..4938ab888ea66 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -601,15 +601,9 @@ export interface IWelcomeModalDialog { buttonText: string; /** - * Main message text and icon for the modal dialog. + * Message text and icon for the modal dialog. */ - mainMessage: { message: string; icon: string }; - - - /** - * Secondary message text and icon for the modal dialog. - */ - secondaryMessage: { message: string; icon: string }; + messages: { message: string; icon: string }[]; /** * Optional action to appear as links at the bottom of the modal dialog. diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts index be1a4e6e05c16..61b7ddea51824 100644 --- a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts +++ b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts @@ -8,7 +8,6 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; -import { ThemeIcon } from 'vs/base/common/themables'; import { IModalDialogService } from 'vs/workbench/services/modalDialog/browser/modalDialogService'; class WelcomeModalContribution { @@ -32,8 +31,7 @@ class WelcomeModalContribution { modalDialogService.show({ title: modalDialog.title, buttonText: modalDialog.buttonText, - mainMessage: { message: modalDialog.mainMessage.message, icon: ThemeIcon.fromId(modalDialog.mainMessage.icon) }, - secondaryMessage: { message: modalDialog.secondaryMessage.message, icon: ThemeIcon.fromId(modalDialog.secondaryMessage.icon) }, + messages: modalDialog.messages, action: modalDialog.action, onClose: () => { storageService.store(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + modalDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); diff --git a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css index 1dbfb46df9998..5733933d6c97e 100644 --- a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css +++ b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css @@ -2,25 +2,44 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ + .monaco-dialog-box{ + border-radius: 6px; +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message { + font-size: 20px ; +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body hr { + color: var(--vscode-descriptionForeground); + margin-bottom: 12px; + background: var(--vscode-welcomePage-tileHoverBackground); +} - .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-item .icon-widget{ +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message .icon-widget{ padding-right: 8px; - max-width: 20px; - max-height: 20px; + max-width: 30px; + max-height: 30px; position: relative; top: auto; + color:var(--vscode-textLink-foreground); + padding-right: 20px; + font-size: 25px; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-item { +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message { display: flex; - padding: 10px 0 20px 12px; - margin: 0; + padding: 20px; min-height: auto; - border: 1px solid var(--vscode-welcomePage-tileBorder); color: var(--vscode-descriptionForeground); + border-radius: 6px; + overflow: hidden; + margin-bottom: 12px; + background: var(--vscode-welcomePage-tileHoverBackground); + align-items: center; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body>.modal-dialog-item { +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body>.modal-dialog-message { grid-area: title; align-self: flex-end; } diff --git a/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts b/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts index 9bdd1906a066f..5b1c8b7a49631 100644 --- a/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts +++ b/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts @@ -17,8 +17,7 @@ import { ILinkDescriptor, Link } from 'vs/platform/opener/browser/link'; export interface IModalDialogItem { readonly title: string; - readonly mainMessage: { message: string; icon: ThemeIcon }; - readonly secondaryMessage: { message: string; icon: ThemeIcon }; + readonly messages: { message: string; icon: string }[]; readonly buttonText: string; readonly action?: ILinkDescriptor; readonly onClose?: () => void; @@ -43,9 +42,10 @@ export class ModalDialogService implements IModalDialogService { @IInstantiationService private readonly instantiationService: IInstantiationService,) { } - private static iconWidgetFor(icon: ThemeIcon) { - if (icon) { - const widget = $(ThemeIcon.asCSSSelector(icon)); + private static iconWidgetFor(icon: string) { + const themeIcon = ThemeIcon.fromId(icon); + if (themeIcon) { + const widget = $(ThemeIcon.asCSSSelector(themeIcon)); widget.classList.add('icon-widget'); return widget; } @@ -59,22 +59,17 @@ export class ModalDialogService implements IModalDialogService { const renderBody = (parent: HTMLElement) => { parent.classList.add(...('modal-dialog-items')); - const mainDescriptorComponent = - $('.modal-dialog-mainmessage', - {}, - ModalDialogService.iconWidgetFor(modalDialogItem.mainMessage.icon), - $('.description-container', {}, - $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(modalDialogItem.mainMessage.message)))); - parent.appendChild(mainDescriptorComponent); - - const secondaryDescriptorComponent = - $('.modal-dialog-secondaryMessage', - {}, - ModalDialogService.iconWidgetFor(modalDialogItem.secondaryMessage.icon), - $('.description-container', {}, - $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(modalDialogItem.secondaryMessage.message)))); - - parent.appendChild(secondaryDescriptorComponent); + parent.appendChild(document.createElement('hr')); + + for (const message of modalDialogItem.messages) { + const descriptorComponent = + $('.modal-dialog-message', + {}, + ModalDialogService.iconWidgetFor(message.icon), + $('.description-container', {}, + $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(message.message)))); + parent.appendChild(descriptorComponent); + } const actionsContainer = $('div.modal-dialog-action-container'); parent.appendChild(actionsContainer); @@ -91,6 +86,7 @@ export class ModalDialogService implements IModalDialogService { detail: '', type: 'none', renderBody: renderBody, + disableCloseAction: true, buttonStyles: defaultButtonStyles, checkboxStyles: defaultCheckboxStyles, inputBoxStyles: defaultInputBoxStyles, From 7d657abe1362c7183455e3046b8e50bb4e1a4e9f Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 8 Mar 2023 16:17:56 -0800 Subject: [PATCH 03/10] More css changes --- .../services/modalDialog/browser/media/modalDialog.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css index 5733933d6c97e..ad32becc16aae 100644 --- a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css +++ b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css @@ -11,9 +11,9 @@ } .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body hr { - color: var(--vscode-descriptionForeground); + border-color: var(--vscode-descriptionForeground); margin-bottom: 12px; - background: var(--vscode-welcomePage-tileHoverBackground); + border-width: thin; } .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message .icon-widget{ From 83a9afe31f955a39cfe9008cc58f7772465f8a88 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 8 Mar 2023 17:44:35 -0800 Subject: [PATCH 04/10] Clean up css --- .../services/modalDialog/browser/media/modalDialog.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css index ad32becc16aae..56803f31a53d3 100644 --- a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css +++ b/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css @@ -2,12 +2,12 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - .monaco-dialog-box{ +.monaco-dialog-box { border-radius: 6px; } .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message { - font-size: 20px ; + font-size: 20px; } .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body hr { @@ -16,13 +16,13 @@ border-width: thin; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message .icon-widget{ +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message .icon-widget { padding-right: 8px; max-width: 30px; max-height: 30px; position: relative; top: auto; - color:var(--vscode-textLink-foreground); + color: var(--vscode-textLink-foreground); padding-right: 20px; font-size: 25px; } From f79aaf2df33de403a23db94e38e7a441981354e7 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 8 Mar 2023 22:22:01 -0800 Subject: [PATCH 05/10] Rename to welcomeModalDialogService --- .../browser/media/welcomeModalDialog.css} | 4 ++++ .../welcomeModalDialog.contribution.ts | 22 +++++++++---------- .../browser/welcomeModalDialogService.ts} | 18 +++++++-------- 3 files changed, 24 insertions(+), 20 deletions(-) rename src/vs/workbench/{services/modalDialog/browser/media/modalDialog.css => contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css} (94%) rename src/vs/workbench/{services/modalDialog/browser/modalDialogService.ts => contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts} (84%) diff --git a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css b/src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css similarity index 94% rename from src/vs/workbench/services/modalDialog/browser/media/modalDialog.css rename to src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css index 56803f31a53d3..47fd4b37e0681 100644 --- a/src/vs/workbench/services/modalDialog/browser/media/modalDialog.css +++ b/src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css @@ -10,6 +10,10 @@ font-size: 20px; } +.monaco-dialog-box .dialog-message-row .dialog-message-container { + padding-left: 0px; +} + .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body hr { border-color: var(--vscode-descriptionForeground); margin-bottom: 12px; diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts index 61b7ddea51824..a27ddb3f73105 100644 --- a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts +++ b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts @@ -8,33 +8,33 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; -import { IModalDialogService } from 'vs/workbench/services/modalDialog/browser/modalDialogService'; +import { IWelcomeModalDialogService } from 'vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService'; class WelcomeModalContribution { private static readonly WELCOME_MODAL_DIALOG_DISMISSED_KEY = 'workbench.modal.dialog.welcome.dismissed'; constructor( - @IModalDialogService modalDialogService: IModalDialogService, + @IWelcomeModalDialogService welcomeModalDialogService: IWelcomeModalDialogService, @IStorageService storageService: IStorageService, @IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService ) { - const modalDialog = environmentService.options?.welcomeModalDialog; - if (!modalDialog) { + const welcomeModalDialog = environmentService.options?.welcomeModalDialog; + if (!welcomeModalDialog) { return; } - if (storageService.getBoolean(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + modalDialog.routeId, StorageScope.PROFILE, false)) { + if (storageService.getBoolean(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + welcomeModalDialog.routeId, StorageScope.PROFILE, false)) { return; } - modalDialogService.show({ - title: modalDialog.title, - buttonText: modalDialog.buttonText, - messages: modalDialog.messages, - action: modalDialog.action, + welcomeModalDialogService.show({ + title: welcomeModalDialog.title, + buttonText: welcomeModalDialog.buttonText, + messages: welcomeModalDialog.messages, + action: welcomeModalDialog.action, onClose: () => { - storageService.store(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + modalDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); + storageService.store(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + welcomeModalDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); } }); } diff --git a/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts similarity index 84% rename from src/vs/workbench/services/modalDialog/browser/modalDialogService.ts rename to src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts index 5b1c8b7a49631..f8f94437f130c 100644 --- a/src/vs/workbench/services/modalDialog/browser/modalDialogService.ts +++ b/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import 'vs/css!./media/modalDialog'; +import 'vs/css!./media/welcomeModalDialog'; import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/base/common/themables'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; @@ -15,7 +15,7 @@ import { $ } from 'vs/base/browser/dom'; import { renderLabelWithIcons } from 'vs/base/browser/ui/iconLabel/iconLabels'; import { ILinkDescriptor, Link } from 'vs/platform/opener/browser/link'; -export interface IModalDialogItem { +interface IWelcomeModalDialogItem { readonly title: string; readonly messages: { message: string; icon: string }[]; readonly buttonText: string; @@ -23,15 +23,15 @@ export interface IModalDialogItem { readonly onClose?: () => void; } -export const IModalDialogService = createDecorator('modalDialogService'); +export const IWelcomeModalDialogService = createDecorator('modalDialogService'); -export interface IModalDialogService { +export interface IWelcomeModalDialogService { readonly _serviceBrand: undefined; - show(item: IModalDialogItem): void; + show(item: IWelcomeModalDialogItem): void; } -export class ModalDialogService implements IModalDialogService { +export class WelcomeModalDialogService implements IWelcomeModalDialogService { declare readonly _serviceBrand: undefined; private dialog: Dialog | undefined; @@ -52,7 +52,7 @@ export class ModalDialogService implements IModalDialogService { return ''; } - async show(modalDialogItem: IModalDialogItem): Promise { + async show(modalDialogItem: IWelcomeModalDialogItem): Promise { this.disposableStore.clear(); @@ -65,7 +65,7 @@ export class ModalDialogService implements IModalDialogService { const descriptorComponent = $('.modal-dialog-message', {}, - ModalDialogService.iconWidgetFor(message.icon), + WelcomeModalDialogService.iconWidgetFor(message.icon), $('.description-container', {}, $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(message.message)))); parent.appendChild(descriptorComponent); @@ -99,5 +99,5 @@ export class ModalDialogService implements IModalDialogService { } } -registerSingleton(IModalDialogService, ModalDialogService, InstantiationType.Eager); +registerSingleton(IWelcomeModalDialogService, WelcomeModalDialogService, InstantiationType.Eager); From 1540290dee4f276e7f604291352ced29fdeae5d8 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Thu, 9 Mar 2023 08:34:01 -0800 Subject: [PATCH 06/10] Update comments and rename to welcomeDialog --- src/vs/workbench/browser/web.api.ts | 16 +++---- .../browser/media/welcomeDialog.css} | 44 ++++++++++--------- .../browser/welcomeDialog.contribution.ts} | 28 ++++++------ .../browser/welcomeDialogService.ts} | 34 +++++++------- 4 files changed, 63 insertions(+), 59 deletions(-) rename src/vs/workbench/contrib/{welcomeModalDialog/browser/media/welcomeModalDialog.css => welcomeDialog/browser/media/welcomeDialog.css} (78%) rename src/vs/workbench/contrib/{welcomeModalDialog/browser/welcomeModalDialog.contribution.ts => welcomeDialog/browser/welcomeDialog.contribution.ts} (51%) rename src/vs/workbench/contrib/{welcomeModalDialog/browser/welcomeModalDialogService.ts => welcomeDialog/browser/welcomeDialogService.ts} (75%) diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index 4938ab888ea66..4c4fc9d4783a6 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -315,9 +315,9 @@ export interface IWorkbenchConstructionOptions { readonly initialColorTheme?: IInitialColorTheme; /** - * Welcome view modal doalog on first launch. Can be dismissed by the user. + * Welcome view dialog on first launch. Can be dismissed by the user. */ - readonly welcomeModalDialog?: IWelcomeModalDialog; + readonly welcomeDialog?: IWelcomeDialog; //#endregion @@ -583,30 +583,30 @@ export interface IInitialColorTheme { readonly colors?: { [colorId: string]: string }; } -export interface IWelcomeModalDialog { +export interface IWelcomeDialog { /** - * Route id. + * Unique identifier of the vscode.dev route constructing the welcome dialog. */ routeId: string; /** - * Title of the modal dialog. + * Title of the welcome dialog. */ title: string; /** - * Button text of the modal dialog. + * Button text of the welcome dialog. */ buttonText: string; /** - * Message text and icon for the modal dialog. + * Message text and icon for the welcome dialog. */ messages: { message: string; icon: string }[]; /** - * Optional action to appear as links at the bottom of the modal dialog. + * Optional action to appear as links at the bottom of the welcome dialog. */ action?: IWelcomeLinkAction; } diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css b/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css similarity index 78% rename from src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css rename to src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css index 47fd4b37e0681..82c853580aa47 100644 --- a/src/vs/workbench/contrib/welcomeModalDialog/browser/media/welcomeModalDialog.css +++ b/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css @@ -6,32 +6,15 @@ border-radius: 6px; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message { - font-size: 20px; -} - .monaco-dialog-box .dialog-message-row .dialog-message-container { padding-left: 0px; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body hr { - border-color: var(--vscode-descriptionForeground); - margin-bottom: 12px; - border-width: thin; -} - -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message .icon-widget { - padding-right: 8px; - max-width: 30px; - max-height: 30px; - position: relative; - top: auto; - color: var(--vscode-textLink-foreground); - padding-right: 20px; +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-text { font-size: 25px; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .modal-dialog-message { +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .dialog-message { display: flex; padding: 20px; min-height: auto; @@ -43,7 +26,28 @@ align-items: center; } -.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body>.modal-dialog-message { +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body>.dialog-message { grid-area: title; align-self: flex-end; } + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .dialog-message hr { + border-color: var(--vscode-descriptionForeground); + margin-bottom: 12px; + border-width: thin; +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .dialog-message .icon-widget { + padding-right: 8px; + max-width: 30px; + max-height: 30px; + position: relative; + top: auto; + color: var(--vscode-textLink-foreground); + padding-right: 20px; + font-size: 25px; +} + +.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .dialog-message .description-container { + font-size: 16px; +} diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts similarity index 51% rename from src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts rename to src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts index a27ddb3f73105..8d9255bef47eb 100644 --- a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialog.contribution.ts +++ b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts @@ -8,37 +8,37 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'; -import { IWelcomeModalDialogService } from 'vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService'; +import { IWelcomeDialogService as IWelcomeDialogService } from 'vs/workbench/contrib/welcomeDialog/browser/welcomeDialogService'; -class WelcomeModalContribution { +class WelcomeDialogContribution { - private static readonly WELCOME_MODAL_DIALOG_DISMISSED_KEY = 'workbench.modal.dialog.welcome.dismissed'; + private static readonly WELCOME_DIALOG_DISMISSED_KEY = 'workbench.dialog.welcome.dismissed'; constructor( - @IWelcomeModalDialogService welcomeModalDialogService: IWelcomeModalDialogService, + @IWelcomeDialogService welcomeDialogService: IWelcomeDialogService, @IStorageService storageService: IStorageService, @IBrowserWorkbenchEnvironmentService environmentService: IBrowserWorkbenchEnvironmentService ) { - const welcomeModalDialog = environmentService.options?.welcomeModalDialog; - if (!welcomeModalDialog) { + const welcomeDialog = environmentService.options?.welcomeDialog; + if (!welcomeDialog) { return; } - if (storageService.getBoolean(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + welcomeModalDialog.routeId, StorageScope.PROFILE, false)) { + if (storageService.getBoolean(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.routeId, StorageScope.PROFILE, false)) { return; } - welcomeModalDialogService.show({ - title: welcomeModalDialog.title, - buttonText: welcomeModalDialog.buttonText, - messages: welcomeModalDialog.messages, - action: welcomeModalDialog.action, + welcomeDialogService.show({ + title: welcomeDialog.title, + buttonText: welcomeDialog.buttonText, + messages: welcomeDialog.messages, + action: welcomeDialog.action, onClose: () => { - storageService.store(WelcomeModalContribution.WELCOME_MODAL_DIALOG_DISMISSED_KEY + '#' + welcomeModalDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); + storageService.store(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); } }); } } Registry.as(WorkbenchExtensions.Workbench) - .registerWorkbenchContribution(WelcomeModalContribution, LifecyclePhase.Restored); + .registerWorkbenchContribution(WelcomeDialogContribution, LifecyclePhase.Restored); diff --git a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialogService.ts similarity index 75% rename from src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts rename to src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialogService.ts index f8f94437f130c..0d1a1ff00f4a8 100644 --- a/src/vs/workbench/contrib/welcomeModalDialog/browser/welcomeModalDialogService.ts +++ b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialogService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import 'vs/css!./media/welcomeModalDialog'; +import 'vs/css!./media/welcomeDialog'; import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { ThemeIcon } from 'vs/base/common/themables'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; @@ -15,7 +15,7 @@ import { $ } from 'vs/base/browser/dom'; import { renderLabelWithIcons } from 'vs/base/browser/ui/iconLabel/iconLabels'; import { ILinkDescriptor, Link } from 'vs/platform/opener/browser/link'; -interface IWelcomeModalDialogItem { +interface IWelcomeDialogItem { readonly title: string; readonly messages: { message: string; icon: string }[]; readonly buttonText: string; @@ -23,15 +23,15 @@ interface IWelcomeModalDialogItem { readonly onClose?: () => void; } -export const IWelcomeModalDialogService = createDecorator('modalDialogService'); +export const IWelcomeDialogService = createDecorator('welcomeDialogService'); -export interface IWelcomeModalDialogService { +export interface IWelcomeDialogService { readonly _serviceBrand: undefined; - show(item: IWelcomeModalDialogItem): void; + show(item: IWelcomeDialogItem): void; } -export class WelcomeModalDialogService implements IWelcomeModalDialogService { +export class WelcomeDialogService implements IWelcomeDialogService { declare readonly _serviceBrand: undefined; private dialog: Dialog | undefined; @@ -52,36 +52,36 @@ export class WelcomeModalDialogService implements IWelcomeModalDialogService { return ''; } - async show(modalDialogItem: IWelcomeModalDialogItem): Promise { + async show(welcomeDialogItem: IWelcomeDialogItem): Promise { this.disposableStore.clear(); const renderBody = (parent: HTMLElement) => { - parent.classList.add(...('modal-dialog-items')); + parent.classList.add(...('dialog-items')); parent.appendChild(document.createElement('hr')); - for (const message of modalDialogItem.messages) { + for (const message of welcomeDialogItem.messages) { const descriptorComponent = - $('.modal-dialog-message', + $('.dialog-message', {}, - WelcomeModalDialogService.iconWidgetFor(message.icon), + WelcomeDialogService.iconWidgetFor(message.icon), $('.description-container', {}, $('.description.description.max-lines-3', { 'x-description-for': 'description' }, ...renderLabelWithIcons(message.message)))); parent.appendChild(descriptorComponent); } - const actionsContainer = $('div.modal-dialog-action-container'); + const actionsContainer = $('div.dialog-action-container'); parent.appendChild(actionsContainer); - if (modalDialogItem.action) { - this.disposableStore.add(this.instantiationService.createInstance(Link, actionsContainer, modalDialogItem.action, {})); + if (welcomeDialogItem.action) { + this.disposableStore.add(this.instantiationService.createInstance(Link, actionsContainer, welcomeDialogItem.action, {})); } }; this.dialog = new Dialog( this.layoutService.container, - modalDialogItem.title, - [modalDialogItem.buttonText], + welcomeDialogItem.title, + [welcomeDialogItem.buttonText], { detail: '', type: 'none', @@ -99,5 +99,5 @@ export class WelcomeModalDialogService implements IWelcomeModalDialogService { } } -registerSingleton(IWelcomeModalDialogService, WelcomeModalDialogService, InstantiationType.Eager); +registerSingleton(IWelcomeDialogService, WelcomeDialogService, InstantiationType.Eager); From 4ee1bc7e14491ca985ba8c90061e3a5bc971f459 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Thu, 9 Mar 2023 09:01:05 -0800 Subject: [PATCH 07/10] Rename to routeId to id --- src/vs/workbench/browser/web.api.ts | 4 ++-- .../welcomeDialog/browser/welcomeDialog.contribution.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index 4c4fc9d4783a6..f5fc7039aeb21 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -586,9 +586,9 @@ export interface IInitialColorTheme { export interface IWelcomeDialog { /** - * Unique identifier of the vscode.dev route constructing the welcome dialog. + * Unique identifier of the web route constructing the welcome dialog. */ - routeId: string; + id: string; /** * Title of the welcome dialog. diff --git a/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts index 8d9255bef47eb..44beb37b53e94 100644 --- a/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts +++ b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts @@ -24,7 +24,7 @@ class WelcomeDialogContribution { return; } - if (storageService.getBoolean(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.routeId, StorageScope.PROFILE, false)) { + if (storageService.getBoolean(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.id, StorageScope.PROFILE, false)) { return; } @@ -34,7 +34,7 @@ class WelcomeDialogContribution { messages: welcomeDialog.messages, action: welcomeDialog.action, onClose: () => { - storageService.store(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.routeId, true, StorageScope.PROFILE, StorageTarget.MACHINE); + storageService.store(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.id, true, StorageScope.PROFILE, StorageTarget.MACHINE); } }); } From d32d90dac2d5242507879bf4fa53db7725e3bb5d Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Thu, 9 Mar 2023 12:43:00 -0800 Subject: [PATCH 08/10] Change storage target to user --- .../contrib/welcomeDialog/browser/welcomeDialog.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts index 44beb37b53e94..15db69ea55119 100644 --- a/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts +++ b/src/vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution.ts @@ -34,7 +34,7 @@ class WelcomeDialogContribution { messages: welcomeDialog.messages, action: welcomeDialog.action, onClose: () => { - storageService.store(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.id, true, StorageScope.PROFILE, StorageTarget.MACHINE); + storageService.store(WelcomeDialogContribution.WELCOME_DIALOG_DISMISSED_KEY + '#' + welcomeDialog.id, true, StorageScope.PROFILE, StorageTarget.USER); } }); } From f5345f17f0ad78a38c062e78ef2e61f332e8e1f5 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Thu, 9 Mar 2023 17:12:53 -0800 Subject: [PATCH 09/10] Fix css and workbench.web --- .../contrib/welcomeDialog/browser/media/welcomeDialog.css | 1 + src/vs/workbench/workbench.web.main.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css b/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css index 82c853580aa47..1e076325ce15e 100644 --- a/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css +++ b/src/vs/workbench/contrib/welcomeDialog/browser/media/welcomeDialog.css @@ -12,6 +12,7 @@ .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-text { font-size: 25px; + width: max-content; } .monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-body .dialog-message { diff --git a/src/vs/workbench/workbench.web.main.ts b/src/vs/workbench/workbench.web.main.ts index b96b78442c86f..caaabcf3778f6 100644 --- a/src/vs/workbench/workbench.web.main.ts +++ b/src/vs/workbench/workbench.web.main.ts @@ -134,6 +134,9 @@ import 'vs/workbench/contrib/debug/browser/extensionHostDebugService'; // Welcome Banner import 'vs/workbench/contrib/welcomeBanner/browser/welcomeBanner.contribution'; +// Welcome Dialog +import 'vs/workbench/contrib/welcomeDialog/browser/welcomeDialog.contribution'; + // Webview import 'vs/workbench/contrib/webview/browser/webview.web.contribution'; From 1e035cf15fbe3a64587b8662cc81448d81c11159 Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Fri, 10 Mar 2023 10:36:34 -0800 Subject: [PATCH 10/10] Update comment for the welcome dialog --- src/vs/workbench/browser/web.api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/web.api.ts b/src/vs/workbench/browser/web.api.ts index f5fc7039aeb21..21415c69b9533 100644 --- a/src/vs/workbench/browser/web.api.ts +++ b/src/vs/workbench/browser/web.api.ts @@ -586,7 +586,8 @@ export interface IInitialColorTheme { export interface IWelcomeDialog { /** - * Unique identifier of the web route constructing the welcome dialog. + * Unique identifier of the welcome dialog. The identifier will be used to determine + * if the dialog has been previously displayed. */ id: string;