diff --git a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts index 7eb01139e..2786c69a8 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts +++ b/arduino-ide-extension/src/browser/boards/boards-config-dialog.ts @@ -69,7 +69,7 @@ export class BoardsConfigDialog extends AbstractDialog { 'Select both a Board and a Port if you want to upload a sketch.', 'If you only select a Board you will be able just to compile, but not to upload your sketch.' ]) { - const p = document.createElement('p'); + const p = document.createElement('div'); p.textContent = paragraph; text.appendChild(p); } diff --git a/arduino-ide-extension/src/browser/settings.tsx b/arduino-ide-extension/src/browser/settings.tsx index 6db428ddb..8650a7137 100644 --- a/arduino-ide-extension/src/browser/settings.tsx +++ b/arduino-ide-extension/src/browser/settings.tsx @@ -24,7 +24,7 @@ export interface Settings extends Index { editorFontSize: number; // `editor.fontSize` themeId: string; // `workbench.colorTheme` autoSave: 'on' | 'off'; // `editor.autoSave` - quickSuggestions: Record<'other'|'comments'|'strings', boolean>; // `editor.quickSuggestions` + quickSuggestions: Record<'other' | 'comments' | 'strings', boolean>; // `editor.quickSuggestions` autoScaleInterface: boolean; // `arduino.window.autoScale` interfaceScale: number; // `arduino.window.zoomLevel` https://github.com/eclipse-theia/theia/issues/8751 @@ -100,9 +100,9 @@ export class SettingsService { this.preferenceService.get('workbench.colorTheme', 'arduino-theme'), this.preferenceService.get<'on' | 'off'>('editor.autoSave', 'on'), this.preferenceService.get('editor.quickSuggestion', { - 'other': false, - 'comments': false, - 'strings': false + 'other': false, + 'comments': false, + 'strings': false }), this.preferenceService.get('arduino.window.autoScale', true), this.preferenceService.get('arduino.window.zoomLevel', 0), @@ -569,18 +569,18 @@ export class SettingsComponent extends React.Component) => { - - // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling - const newVal = event.target.checked ? true : false - - this.setState(prevState => { - return { - quickSuggestions: { - ...prevState.quickSuggestions, - other: newVal - } - } - }); + + // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling + const newVal = event.target.checked ? true : false + + this.setState(prevState => { + return { + quickSuggestions: { + ...prevState.quickSuggestions, + other: newVal + } + } + }); }; protected themeDidChange = (event: React.ChangeEvent) => { @@ -823,7 +823,7 @@ export class AdditionalUrlsDialog extends AbstractDialog { } get value(): string[] { - return this.textArea.value.split('\n').map(url => url.trim()); + return this.textArea.value.split('\n').map(url => url.trim()).filter(url => !!url); } protected onAfterAttach(message: Message): void { diff --git a/arduino-ide-extension/src/browser/style/boards-config-dialog.css b/arduino-ide-extension/src/browser/style/boards-config-dialog.css index 04f3d341c..afeb5b4ce 100644 --- a/arduino-ide-extension/src/browser/style/boards-config-dialog.css +++ b/arduino-ide-extension/src/browser/style/boards-config-dialog.css @@ -1,5 +1,5 @@ div#select-board-dialog { - margin: 5px 20px 50px 20px; + margin: 5px; } div#select-board-dialog .selectBoardContainer .body { @@ -7,8 +7,8 @@ div#select-board-dialog .selectBoardContainer .body { overflow: hidden; } -div.dialogContent.select-board-dialog > div.head { - padding-left: 21px; +.select-board-dialog .head { + margin: 5px; } div.dialogContent.select-board-dialog > div.head .title { @@ -16,11 +16,7 @@ div.dialogContent.select-board-dialog > div.head .title { letter-spacing: .02em; font-size: 1.2em; color: var(--theia-arduino-branding-primary); - margin: 17px 0; -} - -div#select-board-dialog .selectBoardContainer .head .text { - margin-bottom: 21px; + margin-bottom: 10px; } div#select-board-dialog .selectBoardContainer .body .list .item.selected { @@ -57,6 +53,8 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i { #select-board-dialog .selectBoardContainer .body .container { flex: 1; padding: 0px 10px 0px 0px; + min-width: 240px; + max-width: 240px; } #select-board-dialog .selectBoardContainer .body .left.container .content { @@ -82,15 +80,17 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i { color: var(--theia-arduino-branding-secondary); padding: 10px 5px 10px 10px; text-transform: uppercase; - /* The max, min-height comes from `.body .list` 265px + 47px top padding - 2 * 10px top padding */ - max-height: 292px; - min-height: 292px; + /* The max, min-height comes from `.body .list` 200px + 47px top padding - 2 * 10px top padding */ + max-height: 227px; + min-height: 227px; } #select-board-dialog .selectBoardContainer .body .list .item { padding: 10px 5px 10px 10px; display: flex; justify-content: end; + white-space: nowrap; + overflow-x: hidden; } #select-board-dialog .selectBoardContainer .body .list .item .selected-icon { @@ -114,9 +114,17 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i { background: var(--theia-secondaryButton-hoverBackground); } +#select-board-dialog .selectBoardContainer .body .list .label { + max-width: 215px; + width: 215px; + white-space: pre; + overflow: hidden; + text-overflow: ellipsis; +} + #select-board-dialog .selectBoardContainer .body .list { - max-height: 265px; - min-height: 265px; + max-height: 200px; + min-height: 200px; overflow-y: auto; } @@ -132,14 +140,8 @@ div#select-board-dialog .selectBoardContainer .body .list .item.selected i { } .p-Widget.dialogOverlay .dialogContent.select-board-dialog { - width: 740px; -} - - -.dialogControl { - margin: 0 20px 30px 0; + width: 500px; } - .arduino-boards-toolbar-item-container { margin-left: 3px; } diff --git a/arduino-ide-extension/src/common/protocol/sketches-service-client-impl.ts b/arduino-ide-extension/src/common/protocol/sketches-service-client-impl.ts index 0a6fc0f65..a5da3b1e8 100644 --- a/arduino-ide-extension/src/common/protocol/sketches-service-client-impl.ts +++ b/arduino-ide-extension/src/common/protocol/sketches-service-client-impl.ts @@ -135,6 +135,9 @@ export class SketchesServiceClientImpl implements FrontendApplicationContributio */ isReadOnly(uri: URI | monaco.Uri | string): boolean { const toCheck = uri instanceof URI ? uri : new URI(uri); + if (toCheck.scheme === 'user-storage') { + return false; + } const readOnly = !this.workspaceService.tryGetRoots().some(({ resource }) => resource.isEqualOrParent(toCheck)); return readOnly; } diff --git a/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts b/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts index f3727aa73..82df67227 100644 --- a/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts +++ b/arduino-ide-extension/src/electron-main/theia/electron-main-application.ts @@ -82,16 +82,6 @@ export class ElectronMainApplication extends TheiaElectronMainApplication { return electronWindow; } - protected async getDefaultBrowserWindowOptions(): Promise { - const options = await super.getDefaultBrowserWindowOptions(); - return { - ...options, - // Set and use a custom minimum window size: https://github.com/arduino/arduino-pro-ide/issues/337#issuecomment-687017281 - minWidth: 900, - minHeight: 800 - }; - } - protected async startBackend(): Promise { // Check if we should run everything as one process. const noBackendFork = process.argv.indexOf('--no-cluster') !== -1; diff --git a/arduino-ide-extension/src/node/core-client-provider.ts b/arduino-ide-extension/src/node/core-client-provider.ts index 7919ea9bf..319e48f43 100644 --- a/arduino-ide-extension/src/node/core-client-provider.ts +++ b/arduino-ide-extension/src/node/core-client-provider.ts @@ -24,7 +24,7 @@ export class CoreClientProvider extends GrpcClientProvider { + protected async reconcileClient(port: string | number | undefined): Promise { if (port && port === this._port) { // No need to create a new gRPC client, but we have to update the indexes. if (this._client) {