diff --git a/extensions/notebook/src/common/localizedConstants.ts b/extensions/notebook/src/common/localizedConstants.ts index eca4205758..3362b5c007 100644 --- a/extensions/notebook/src/common/localizedConstants.ts +++ b/extensions/notebook/src/common/localizedConstants.ts @@ -87,13 +87,12 @@ export function msgDownloadLocation(downloadLocation: string): string { return l export const newBook = localize('newBook', "New Jupyter Book (Preview)"); export const bookDescription = localize('bookDescription', "Jupyter Books are used to organize Notebooks."); export const learnMore = localize('learnMore', "Learn more."); -export const locationBrowser = localize('locationBrowser', "Browse locations..."); -export const selectContentFolder = localize('selectContentFolder', "Select content folder"); +export const contentFolder = localize('contentFolder', "Content folder"); export const browse = localize('browse', "Browse"); export const create = localize('create', "Create"); export const name = localize('name', "Name"); export const saveLocation = localize('saveLocation', "Save location"); -export const contentFolder = localize('contentFolder', "Content folder (Optional)"); +export const contentFolderOptional = localize('contentFolderOptional', "Content folder (Optional)"); export const msgContentFolderError = localize('msgContentFolderError', "Content folder path does not exist"); export const msgSaveFolderError = localize('msgSaveFolderError', "Save location path does not exist."); export function msgCreateBookWarningMsg(file: string): string { return localize('msgCreateBookWarningMsg', "Error while trying to access: {0}", file); } diff --git a/extensions/notebook/src/dialog/createBookDialog.ts b/extensions/notebook/src/dialog/createBookDialog.ts index 6d60688405..c16793aa14 100644 --- a/extensions/notebook/src/dialog/createBookDialog.ts +++ b/extensions/notebook/src/dialog/createBookDialog.ts @@ -81,34 +81,31 @@ export class CreateBookDialog { }).component(); this.bookNameInputBox = this.view.modelBuilder.inputBox() - .withProperties({ - values: [], + .withProps({ value: '', enabled: true }).component(); - this.saveLocationInputBox = this.view.modelBuilder.inputBox().withProperties({ - values: [], + this.saveLocationInputBox = this.view.modelBuilder.inputBox().withProps({ value: '', - placeHolder: loc.locationBrowser, + ariaLabel: loc.saveLocation, width: '400px' }).component(); - this.contentFolderInputBox = this.view.modelBuilder.inputBox().withProperties({ - values: [], + this.contentFolderInputBox = this.view.modelBuilder.inputBox().withProps({ value: '', - placeHolder: loc.selectContentFolder, + ariaLabel: loc.contentFolder, width: '400px' }).component(); - const browseFolderButton = view.modelBuilder.button().withProperties({ + const browseFolderButton = view.modelBuilder.button().withProps({ ariaLabel: loc.browse, iconPath: IconPathHelper.folder, width: '18px', height: '20px', }).component(); - const browseContentFolderButton = view.modelBuilder.button().withProperties({ + const browseContentFolderButton = view.modelBuilder.button().withProps({ ariaLabel: loc.browse, iconPath: IconPathHelper.folder, width: '18px', @@ -147,7 +144,7 @@ export class CreateBookDialog { component: this.createHorizontalContainer(view, [this.saveLocationInputBox, browseFolderButton]) }, { - title: loc.contentFolder, + title: loc.contentFolderOptional, required: false, component: this.createHorizontalContainer(view, [this.contentFolderInputBox, browseContentFolderButton]) }, diff --git a/test/automation/src/sql/createBookDialog.ts b/test/automation/src/sql/createBookDialog.ts index 9655c2cc7d..135808cb22 100644 --- a/test/automation/src/sql/createBookDialog.ts +++ b/test/automation/src/sql/createBookDialog.ts @@ -9,8 +9,8 @@ import { Dialog } from './dialog'; const CREATE_BOOK_DIALOG_TITLE = 'New Jupyter Book (Preview)'; const NAME_INPUT_SELECTOR = '.modal .modal-body input[aria-label="Name. Please fill out this field."]'; -const LOCATION_INPUT_SELECTOR = '.modal .modal-body input[title="Browse locations..."]'; -const CONTENT_FOLDER_INPUT_SELECTOR = '.modal .modal-body input[title="Select content folder"]'; +const LOCATION_INPUT_SELECTOR = '.modal .modal-body input[aria-label="Save location"]'; +const CONTENT_FOLDER_INPUT_SELECTOR = '.modal .modal-body input[aria-label="Content folder"]'; const CREATE_BUTTON_SELECTOR = '.modal .modal-footer a[aria-label="Create"]:not(.disabled)'; export class CreateBookDialog extends Dialog {