8000 [WIP]: Theia 1.27.0 signed by kittaakos · Pull Request #1241 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

[WIP]: Theia 1.27.0 signed #1241

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

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Bumped to Theia 1.27.0
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Jul 22, 2022
commit 352adb4f8ed42e4f1012daf0db0281c540a8d382
30 changes: 15 additions & 15 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.6.7",
"@theia/application-package": "1.25.0",
"@theia/core": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/electron": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/markers": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/outline-view": "1.25.0",
"@theia/output": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/search-in-workspace": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/application-package": "1.27.0",
"@theia/core": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/electron": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/markers": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/outline-view": "1.27.0",
"@theia/output": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/search-in-workspace": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"@tippyjs/react": "^4.2.5",
"@types/atob": "^2.1.2",
"@types/auth0-js": "^9.14.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { MonitorViewContribution } from './serial/monitor/monitor-view-contribut
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
import { MonacoThemeRegistry } from '@theia/monaco/lib/browser/textmate/monaco-theme-registry';

@injectable()
export class ArduinoFrontendContribution
Expand Down Expand Up @@ -78,6 +79,9 @@ export class ArduinoFrontendContribution
@inject(FrontendApplicationStateService)
private readonly appStateService: FrontendApplicationStateService;

@inject(MonacoThemeRegistry)
private readonly themeRegistry: MonacoThemeRegistry;

@postConstruct()
protected async init(): Promise<void> {
if (!window.navigator.onLine) {
Expand All @@ -89,6 +93,18 @@ export class ArduinoFrontendContribution
)
);
}
this.themeRegistry.register({
id: 'arduino-theme',
label: 'Light (Arduino)',
uiTheme: 'vs',
json: require('../../src/browser/data/default.color-theme.json'),
});
this.themeRegistry.register({
id: 'arduino-theme-dark',
label: 'Dark (Arduino)',
uiTheme: 'vs-dark',
json: require('../../src/browser/data/dark.color-theme.json'),
});
}

async onStart(app: FrontendApplication): Promise<void> {
Expand Down
15 changes: 0 additions & 15 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import { BoardsAutoInstaller } from './boards/boards-auto-installer';
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
import { ListItemRenderer } from './widgets/component-list/list-item-renderer';
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
import { MonacoThemingService } from '@theia/monaco/lib/browser/monaco-theming-service';
import {
ArduinoDaemonPath,
ArduinoDaemon,
Expand Down Expand Up @@ -311,20 +310,6 @@ import { CheckForUpdates } from './contributions/check-for-updates';
import { OpenBoardsConfig } from './contributions/open-boards-config';
import { SketchFilesTracker } from './contributions/sketch-files-tracker';

MonacoThemingService.register({
id: 'arduino-theme',
label: 'Light (Arduino)',
uiTheme: 'vs',
json: require('../../src/browser/data/default.color-theme.json'),
});

MonacoThemingService.register({
id: 'arduino-theme-dark',
label: 'Dark (Arduino)',
uiTheme: 'vs-dark',
json: require('../../src/browser/data/dark.color-theme.json'),
});

export default new ContainerModule((bind, unbind, isBound, rebind) => {
// Commands and toolbar items
bind(ArduinoFrontendContribution).toSelf().inSingletonScope();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,18 @@ export class SettingsComponent extends React.Component<
<select
className="theia-select"
value={
ThemeService.get()
this.props.themeService
.getThemes()
.find(({ id }) => id === this.state.themeId)?.label ||
nls.localize('arduino/common/unknown', 'Unknown')
}
onChange={this.themeDidChange}
>
{ThemeService.get()
.getThemes()
.map(({ id, label }) => (
<option key={id} value={label}>
{label}
</option>
))}
{this.props.themeService.getThemes().map(({ id, label }) => (
<option key={id} value={label}>
{label}
</option>
))}
</select>
</div>
<div className="flex-line">
Expand Down Expand Up @@ -588,7 +586,7 @@ export class SettingsComponent extends React.Component<
event: React.ChangeEvent<HTMLSelectElement>
): void => {
const { selectedIndex } = event.target.options;
const theme = ThemeService.get().getThemes()[selectedIndex];
const theme = this.props.themeService.getThemes()[selectedIndex];
if (theme) {
this.setState({ themeId: theme.id });
}
Expand Down Expand Up @@ -728,6 +726,7 @@ export namespace SettingsComponent {
readonly fileDialogService: FileDialogService;
readonly windowService: WindowService;
readonly localizationProvider: AsyncLocalizationProvider;
readonly themeService: ThemeService;
}
export type State = Settings & {
rawAdditionalUrlsValue: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { SettingsComponent } from './settings-component';
import { AsyncLocalizationProvider } from '@theia/core/lib/common/i18n/localization';
import { AdditionalUrls } from '../../../common/protocol';
import { AbstractDialog } from '../../theia/dialogs/dialogs';
import { ThemeService } from '@theia/core/lib/browser/theming';

@injectable()
export class SettingsWidget extends ReactWidget {
Expand All @@ -34,6 +35,9 @@ export class SettingsWidget extends ReactWidget {
@inject(AsyncLocalizationProvider)
protected readonly localizationProvider: AsyncLocalizationProvider;

@inject(ThemeService)
private readonly themeService: ThemeService;

protected render(): React.ReactNode {
return (
<SettingsComponent
Expand All @@ -42,6 +46,7 @@ export class SettingsWidget extends ReactWidget {
fileDialogService={this.fileDialogService}
windowService={this.windowService}
localizationProvider={this.localizationProvider}
themeService={this.themeService}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ export class SettingsService {
@inject(CommandService)
protected commandService: CommandService;

@inject(ThemeService)
private readonly themeService: ThemeService;

protected readonly onDidChangeEmitter = new Emitter<Readonly<Settings>>();
readonly onDidChange = this.onDidChangeEmitter.event;
protected readonly onDidResetEmitter = new Emitter<Readonly<Settings>>();
Expand Down Expand Up @@ -226,11 +229,7 @@ export class SettingsService {
'Invalid editor font size. It must be a positive integer.'
);
}
if (
!ThemeService.get()
.getThemes()
.find(({ id }) => id === themeId)
) {
if (!this.themeService.getThemes().find(({ id }) => id === themeId)) {
return nls.localize(
'arduino/preferences/invalid.theme',
'Invalid theme.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export class DebugSessionManager extends TheiaDebugSessionManager {
}

const sessionId = await this.debug.createDebugSession(
resolved.configuration
resolved.configuration,
undefined
);
return this.doStart(sessionId, resolved);
} catch (e) {
Expand Down
32 changes: 16 additions & 16 deletions browser-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"version": "2.0.0-rc9",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@theia/core": "1.25.0",
"@theia/debug": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/file-search": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/messages": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/plugin-ext": "1.25.0",
"@theia/plugin-ext-vscode": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/core": "1.27.0",
"@theia/debug": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/file-search": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/messages": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/plugin-ext": "1.27.0",
"@theia/plugin-ext-vscode": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/process": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"arduino-ide-extension": "2.0.0-rc9"
},
"devDependencies": {
"@theia/cli": "1.25.0"
"@theia/cli": "1.27.0"
},
"scripts": {
"prepare": "theia build --mode development",
Expand Down
34 changes: 17 additions & 17 deletions electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
"license": "AGPL-3.0-or-later",
"main": "src-gen/frontend/electron-main.js",
"dependencies": {
"@theia/core": "1.25.0",
"@theia/debug": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/electron": "1.25.0",
"@theia/file-search": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/keymaps": "1.25.0",
"@theia/messages": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/plugin-ext": "1.25.0",
"@theia/plugin-ext-vscode": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@theia/core": "1.27.0",
"@theia/debug": "1.27.0",
"@theia/editor": "1.27.0",
"@theia/electron": "1.27.0",
"@theia/file-search": "1.27.0",
"@theia/filesystem": "1.27.0",
"@theia/keymaps": "1.27.0",
"@theia/messages": "1.27.0",
"@theia/monaco": "1.27.0",
"@theia/navigator": "1.27.0",
"@theia/plugin-ext": "1.27.0",
"@theia/plugin-ext-vscode": "1.27.0",
"@theia/preferences": "1.27.0",
"@theia/process": "1.27.0",
"@theia/terminal": "1.27.0",
"@theia/workspace": "1.27.0",
"arduino-ide-extension": "2.0.0-rc9"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"electron": "^15.3.5"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion electron/build/template-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"node-log-rotate": "^0.1.5"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"cross-env": "^7.0.2",
"electron-builder": "23.0.2",
"electron-notarize": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"node": ">=14.0.0 <15"
},
"devDependencies": {
"@theia/cli": "1.25.0",
"@theia/cli": "1.27.0",
"@types/sinon": "^2.3.5",
"@types/jsdom": "^11.0.4",
"@typescript-eslint/eslint-plugin": "^4.27.0",
Expand Down
Loading
0