Skip to content

Commit

Permalink
fix: revive --theia-icon-loading in IDE2
Browse files Browse the repository at this point in the history
 - it has been removed from Theia
 - aligned the DOM structure to previous the version when using widget

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Nov 23, 2022
1 parent f338106 commit bfcb518
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ export class UploadFirmwareDialog extends ReactDialog<void> {

protected override render(): React.ReactNode {
return (
<form>
<FirmwareUploaderComponent
availableBoards={this.availableBoards}
firmwareUploader={this.arduinoFirmwareUploader}
flashFirmware={this.flashFirmware.bind(this)}
updatableFqbns={this.updatableFqbns}
isOpen={this.isOpen}
/>
</form>
<div>
<form>
<FirmwareUploaderComponent
availableBoards={this.availableBoards}
firmwareUploader={this.arduinoFirmwareUploader}
flashFirmware={this.flashFirmware.bind(this)}
updatableFqbns={this.updatableFqbns}
isOpen={this.isOpen}
/>
</form>
</div>
);
}

Expand All @@ -86,11 +88,6 @@ export class UploadFirmwareDialog extends ReactDialog<void> {
this.update();
}

protected override onUpdateRequest(msg: Message): void {
super.onUpdateRequest(msg);
this.update();
}

// eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars
protected override handleEnter(event: KeyboardEvent): boolean | void {
return false;
Expand Down
6 changes: 6 additions & 0 deletions arduino-ide-extension/src/browser/icons/loading-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions arduino-ide-extension/src/browser/icons/loading-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions arduino-ide-extension/src/browser/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
@import './progress-bar.css';
@import './settings-step-input.css';

/* Revive of the `--theia-icon-loading`. The variable has been removed from Theia while IDE2 still uses is. */
/* The SVG icons are still part of Theia (1.31.1) */
/* https://github.com/arduino/arduino-ide/pull/1662#issuecomment-1324997134 */
body {
--theia-icon-loading: url(../icons/loading-light.svg);
}
body.theia-dark {
--theia-icon-loading: url(../icons/loading-dark.svg);
}

.theia-input.warning:focus {
outline-width: 1px;
outline-style: solid;
Expand Down

0 comments on commit bfcb518

Please sign in to comment.