Skip to content

feat: use theia@1.57.0 #2654

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 18 commits into from
Mar 28, 2025
Merged
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
chore: use theia@1.56.0
  • Loading branch information
giacomocusinato committed Mar 28, 2025
commit 85bce1e68bbf6b4d70dad6ddd513e914b2ce9d7d
44 changes: 22 additions & 22 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.8.14",
"@theia/application-package": "1.55.1",
"@theia/core": "1.55.1",
"@theia/debug": "1.55.1",
"@theia/editor": "1.55.1",
"@theia/electron": "1.55.1",
"@theia/filesystem": "1.55.1",
"@theia/keymaps": "1.55.1",
"@theia/markers": "1.55.1",
"@theia/messages": "1.55.1",
"@theia/monaco": "1.55.1",
"@theia/application-package": "1.56.0",
"@theia/core": "1.56.0",
"@theia/debug": "1.56.0",
"@theia/editor": "1.56.0",
"@theia/electron": "1.56.0",
"@theia/filesystem": "1.56.0",
"@theia/keymaps": "1.56.0",
"@theia/markers": "1.56.0",
"@theia/messages": "1.56.0",
"@theia/monaco": "1.56.0",
"@theia/monaco-editor-core": "1.83.101",
"@theia/navigator": "1.55.1",
"@theia/outline-view": "1.55.1",
"@theia/output": "1.55.1",
"@theia/plugin-ext": "1.55.1",
"@theia/plugin-ext-vscode": "1.55.1",
"@theia/preferences": "1.55.1",
"@theia/scm": "1.55.1",
"@theia/search-in-workspace": "1.55.1",
"@theia/terminal": "1.55.1",
"@theia/test": "1.55.1",
"@theia/typehierarchy": "1.55.1",
"@theia/workspace": "1.55.1",
"@theia/navigator": "1.56.0",
"@theia/outline-view": "1.56.0",
"@theia/output": "1.56.0",
"@theia/plugin-ext": "1.56.0",
"@theia/plugin-ext-vscode": "1.56.0",
"@theia/preferences": "1.56.0",
"@theia/scm": "1.56.0",
"@theia/search-in-workspace": "1.56.0",
"@theia/terminal": "1.56.0",
"@theia/test": "1.56.0",
"@theia/typehierarchy": "1.56.0",
"@theia/workspace": "1.56.0",
"@tippyjs/react": "^4.2.5",
"@types/auth0-js": "^9.21.3",
"@types/btoa": "^1.2.3",
Expand Down
57 changes: 2 additions & 55 deletions arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import '../../src/browser/style/index.css';
import {
Container,
ContainerModule,
interfaces,
} from '@theia/core/shared/inversify';
import { Container, ContainerModule } from '@theia/core/shared/inversify';
import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
import { CommandContribution } from '@theia/core/lib/common/command';
import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
Expand Down Expand Up @@ -55,8 +51,6 @@ import {
DockPanelRenderer as TheiaDockPanelRenderer,
TabBarRendererFactory,
ContextMenuRenderer,
createTreeContainer,
TreeWidget,
} from '@theia/core/lib/browser';
import { MenuContribution } from '@theia/core/lib/common/menu';
import {
Expand Down Expand Up @@ -373,15 +367,7 @@ import { DebugSessionWidget } from '@theia/debug/lib/browser/view/debug-session-
import { DebugConfigurationWidget } from './theia/debug/debug-configuration-widget';
import { DebugConfigurationWidget as TheiaDebugConfigurationWidget } from '@theia/debug/lib/browser/view/debug-configuration-widget';
import { DebugToolBar } from '@theia/debug/lib/browser/view/debug-toolbar-widget';
import {
PluginTree,
PluginTreeModel,
TreeViewWidgetOptions,
VIEW_ITEM_CONTEXT_MENU,
} from '@theia/plugin-ext/lib/main/browser/view/tree-view-widget';
import { TreeViewDecoratorService } from '@theia/plugin-ext/lib/main/browser/view/tree-view-decorator-service';
import { PLUGIN_VIEW_DATA_FACTORY_ID } from '@theia/plugin-ext/lib/main/browser/view/plugin-view-registry';
import { TreeViewWidget } from './theia/plugin-ext/tree-view-widget';

import {
VersionWelcomeDialog,
VersionWelcomeDialogProps,
Expand Down Expand Up @@ -1090,46 +1076,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
TerminalFrontendContribution
);

bindViewsWelcome_TheiaGH14309({ bind, widget: TreeViewWidget });

// Hides the Test Explorer from the side-bar
bind(TestViewContribution).toSelf().inSingletonScope();
rebind(TheiaTestViewContribution).toService(TestViewContribution);
});

// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
// Copied from Theia code but with customized TreeViewWidget with the customized viewsWelcome rendering
// https://github.com/eclipse-theia/theia/blob/0c5f69455d9ee355b1a7ca510ffa63d2b20f0c77/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts#L159-L181
function bindViewsWelcome_TheiaGH14309({
bind,
widget,
}: {
bind: interfaces.Bind;
widget: interfaces.Newable<TreeWidget>;
}) {
bind(WidgetFactory)
.toDynamicValue(({ container }) => ({
id: PLUGIN_VIEW_DATA_FACTORY_ID,
createWidget: (options: TreeViewWidgetOptions) => {
const props = {
contextMenuPath: VIEW_ITEM_CONTEXT_MENU,
expandOnlyOnExpansionToggleClick: true,
expansionTogglePadding: 22,
globalSelection: true,
leftPadding: 8,
search: true,
multiSelect: options.multiSelect,
};
const child = createTreeContainer(container, {
props,
tree: PluginTree,
model: PluginTreeModel,
widget,
decoratorService: TreeViewDecoratorService,
});
child.bind(TreeViewWidgetOptions).toConstantValue(options);
return child.get(TreeWidget);
},
}))
.inSingletonScope();
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class BoardsConfigDialog extends ReactDialog<BoardsConfigDialogState> {
}

override async open(
disposeOnResolve = true,
params?: EditBoardsConfigActionParams
): Promise<BoardsConfig | undefined> {
this._searchSet = undefined;
Expand All @@ -119,7 +120,7 @@ export class BoardsConfigDialog extends ReactDialog<BoardsConfigDialogState> {
this._searchSet = params.searchSet.slice();
}
}
return super.open();
return super.open(disposeOnResolve);
}

protected override onAfterAttach(msg: Message): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class CheckForIDEUpdates extends Contribution {
SKIP_IDE_VERSION
);
if (versionToSkip === updateInfo.version) return;
this.updaterDialog.open(updateInfo);
this.updaterDialog.open(true, updateInfo);
})
.catch((e) => {
this.messageService.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class OpenBoardsConfig extends Contribution {
override registerCommands(registry: CommandRegistry): void {
registry.registerCommand(OpenBoardsConfig.Commands.OPEN_DIALOG, {
execute: async (params?: EditBoardsConfigActionParams) =>
this.boardsConfigDialog.open(params),
this.boardsConfigDialog.open(true, params),
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
}

override async open(
disposeOnResolve = true,
data: UpdateInfo | undefined = undefined
): Promise<UpdateInfo | undefined> {
if (data && data.version) {
Expand All @@ -271,7 +272,7 @@ export class IDEUpdaterDialog extends ReactDialog<UpdateInfo | undefined> {
error: undefined,
});
this.updateInfo = data;
return super.open();
return super.open(disposeOnResolve);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class IDEUpdaterCommands implements CommandContribution {
try {
const updateInfo = await this.updater.checkForUpdates(initialCheck);
if (!!updateInfo) {
this.updaterDialog.open(updateInfo);
this.updaterDialog.open(true, updateInfo);
} else {
this.messageService.info(
nls.localize(
Expand Down
Loading