Skip to content

Removed the min window height and width. #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class BoardsConfigDialog extends AbstractDialog<BoardsConfig.Config> {
'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);
}
Expand Down
34 changes: 17 additions & 17 deletions arduino-ide-extension/src/browser/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -100,9 +100,9 @@ export class SettingsService {
this.preferenceService.get<string>('workbench.colorTheme', 'arduino-theme'),
this.preferenceService.get<'on' | 'off'>('editor.autoSave', 'on'),
this.preferenceService.get<object>('editor.quickSuggestion', {
'other': false,
'comments': false,
'strings': false
'other': false,
'comments': false,
'strings': false
}),
this.preferenceService.get<boolean>('arduino.window.autoScale', true),
this.preferenceService.get<number>('arduino.window.zoomLevel', 0),
Expand Down Expand Up @@ -569,18 +569,18 @@ export class SettingsComponent extends React.Component<SettingsComponent.Props,
};

protected quickSuggestionsOtherDidChange = (event: React.ChangeEvent<HTMLInputElement>) => {
// 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<HTMLSelectElement>) => {
Expand Down Expand Up @@ -823,7 +823,7 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
}

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 {
Expand Down
42 changes: 22 additions & 20 deletions arduino-ide-extension/src/browser/style/boards-config-dialog.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
div#select-board-dialog {
margin: 5px 20px 50px 20px;
margin: 5px;
}

div#select-board-dialog .selectBoardContainer .body {
display: flex;
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 {
font-weight: 400;
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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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;
}

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
return electronWindow;
}

protected async getDefaultBrowserWindowOptions(): Promise<TheiaBrowserWindowOptions> {
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<number> {
// Check if we should run everything as one process.
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;
Expand Down
2 changes: 1 addition & 1 deletion arduino-ide-extension/src/node/core-client-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class CoreClientProvider extends GrpcClientProvider<CoreClientProvider.Cl
client.client.close();
}

protected async reconcileClient(port: string | undefined): Promise<void> {
protected async reconcileClient(port: string | number | undefined): Promise<void> {
if (port && port === this._port) {
// No need to create a new gRPC client, but we have to update the indexes.
if (this._client) {
Expand Down