Skip to content

Commit d596925

Browse files
chore: use [email protected]
Note: align SidebarBottomMenuWidget with Theia new API and HTML structure
1 parent 1fa0def commit d596925

File tree

6 files changed

+391
-396
lines changed

6 files changed

+391
-396
lines changed

Diff for: arduino-ide-extension/package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,29 @@
2424
},
2525
"dependencies": {
2626
"@grpc/grpc-js": "^1.8.14",
27-
"@theia/application-package": "1.50.1",
28-
"@theia/core": "1.50.1",
29-
"@theia/debug": "1.50.1",
30-
"@theia/editor": "1.50.1",
31-
"@theia/electron": "1.50.1",
32-
"@theia/filesystem": "1.50.1",
33-
"@theia/keymaps": "1.50.1",
34-
"@theia/markers": "1.50.1",
35-
"@theia/messages": "1.50.1",
36-
"@theia/monaco": "1.50.1",
27+
"@theia/application-package": "1.51.0",
28+
"@theia/core": "1.51.0",
29+
"@theia/debug": "1.51.0",
30+
"@theia/editor": "1.51.0",
31+
"@theia/electron": "1.51.0",
32+
"@theia/filesystem": "1.51.0",
33+
"@theia/keymaps": "1.51.0",
34+
"@theia/markers": "1.51.0",
35+
"@theia/messages": "1.51.0",
36+
"@theia/monaco": "1.51.0",
3737
"@theia/monaco-editor-core": "1.83.101",
38-
"@theia/navigator": "1.50.1",
39-
"@theia/outline-view": "1.50.1",
40-
"@theia/output": "1.50.1",
41-
"@theia/plugin-ext": "1.50.1",
42-
"@theia/plugin-ext-vscode": "1.50.1",
43-
"@theia/preferences": "1.50.1",
44-
"@theia/scm": "1.50.1",
45-
"@theia/search-in-workspace": "1.50.1",
46-
"@theia/terminal": "1.50.1",
47-
"@theia/test": "1.50.1",
48-
"@theia/typehierarchy": "1.50.1",
49-
"@theia/workspace": "1.50.1",
38+
"@theia/navigator": "1.51.0",
39+
"@theia/outline-view": "1.51.0",
40+
"@theia/output": "1.51.0",
41+
"@theia/plugin-ext": "1.51.0",
42+
"@theia/plugin-ext-vscode": "1.51.0",
43+
"@theia/preferences": "1.51.0",
44+
"@theia/scm": "1.51.0",
45+
"@theia/search-in-workspace": "1.51.0",
46+
"@theia/terminal": "1.51.0",
47+
"@theia/test": "1.51.0",
48+
"@theia/typehierarchy": "1.51.0",
49+
"@theia/workspace": "1.51.0",
5050
"@tippyjs/react": "^4.2.5",
5151
"@types/auth0-js": "^9.21.3",
5252
"@types/btoa": "^1.2.3",

Diff for: arduino-ide-extension/src/browser/style/cloud-sketchbook.css

+2-6
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,12 @@
9898
color: var(--theia-textLink-foreground);
9999
}
100100

101-
.account-icon {
101+
img.arduino-account-picture {
102102
width: var(--theia-private-sidebar-icon-size);
103103
height: var(--theia-private-sidebar-icon-size);
104-
border-radius: 50%;
105-
overflow: hidden;
106-
}
107-
108-
.account-icon > img {
109104
max-width: 100%;
110105
max-height: 100%;
106+
border-radius: 50%;
111107
}
112108

113109
.connected-status-icon {

Diff for: arduino-ide-extension/src/browser/theia/core/sidebar-bottom-menu-widget.tsx

+23-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SidebarBottomMenuWidget as TheiaSidebarBottomMenuWidget } from '@theia/core/lib/browser/shell/sidebar-bottom-menu-widget';
2-
import type { SidebarMenu } from '@theia/core/lib/browser/shell/sidebar-menu-widget';
2+
import type { SidebarMenuItem } from '@theia/core/lib/browser/shell/sidebar-menu-widget';
33
import type { MenuPath } from '@theia/core/lib/common/menu';
44
import { nls } from '@theia/core/lib/common/nls';
55
import {
@@ -46,46 +46,45 @@ export class SidebarBottomMenuWidget extends TheiaSidebarBottomMenuWidget {
4646
this.contextMenuRenderer.render(options);
4747
}
4848

49-
protected override render(): React.ReactNode {
50-
return (
51-
<React.Fragment>
52-
{this.menus.map((menu) => this.renderMenu(menu))}
53-
</React.Fragment>
54-
);
55-
}
56-
57-
private renderMenu(menu: SidebarMenu): React.ReactNode {
49+
override renderItem(item: SidebarMenuItem): React.ReactNode {
5850
// Removes the _Settings_ (cog) icon from the left sidebar
59-
if (menu.id === 'settings-menu') {
51+
if (item.menu.id === 'settings-menu') {
6052
return undefined;
6153
}
62-
const arduinoAccount = menu.id === accountMenu.id;
63-
const picture =
54+
const arduinoAccount = item.menu.id === accountMenu.id;
55+
const arduinoAccountPicture =
6456
arduinoAccount &&
6557
this.connectionStatue.offlineStatus !== 'internet' &&
6658
this.createFeatures.session?.account.picture;
67-
const className = typeof picture === 'string' ? undefined : menu.iconClass;
59+
6860
return (
69-
<i
70-
key={menu.id}
71-
className={className}
72-
title={menu.title}
73-
onClick={(e) => this.onClick(e, menu.menuPath)}
61+
<div
62+
key={item.menu.id}
63+
className="theia-sidebar-menu-item"
64+
title={item.menu.title}
65+
onClick={(e) => this.onClick(e, item.menu.menuPath)}
7466
onMouseDown={this.onMouseDown}
67+
onMouseEnter={(e) => this.onMouseEnter(e, item.menu.title)}
7568
onMouseOut={this.onMouseOut}
7669
>
77-
{picture && (
78-
<div className="account-icon">
70+
{arduinoAccountPicture ? (
71+
<i>
7972
<img
80-
src={picture}
73+
className="arduino-account-picture"
74+
src={arduinoAccountPicture}
8175
alt={nls.localize(
8276
'arduino/cloud/profilePicture',
8377
'Profile picture'
8478
)}
8579
/>
86-
</div>
80+
</i>
81+
) : (
82+
<i className={item.menu.iconClass} />
83+
)}
84+
{item.badge && (
85+
<div className="theia-badge-decorator-sidebar">{item.badge}</div>
8786
)}
88-
</i>
87+
</div>
8988
);
9089
}
9190
}

Diff for: electron-app/package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
"license": "AGPL-3.0-or-later",
66
"main": "./src-gen/backend/electron-main.js",
77
"dependencies": {
8-
"@theia/core": "1.50.1",
9-
"@theia/debug": "1.50.1",
10-
"@theia/editor": "1.50.1",
11-
"@theia/electron": "1.50.1",
12-
"@theia/filesystem": "1.50.1",
13-
"@theia/keymaps": "1.50.1",
14-
"@theia/messages": "1.50.1",
15-
"@theia/monaco": "1.50.1",
16-
"@theia/navigator": "1.50.1",
17-
"@theia/plugin-ext": "1.50.1",
18-
"@theia/plugin-ext-vscode": "1.50.1",
19-
"@theia/preferences": "1.50.1",
20-
"@theia/terminal": "1.50.1",
21-
"@theia/workspace": "1.50.1",
8+
"@theia/core": "1.51.0",
9+
"@theia/debug": "1.51.0",
10+
"@theia/editor": "1.51.0",
11+
"@theia/electron": "1.51.0",
12+
"@theia/filesystem": "1.51.0",
13+
"@theia/keymaps": "1.51.0",
14+
"@theia/messages": "1.51.0",
15+
"@theia/monaco": "1.51.0",
16+
"@theia/navigator": "1.51.0",
17+
"@theia/plugin-ext": "1.51.0",
18+
"@theia/plugin-ext-vscode": "1.51.0",
19+
"@theia/preferences": "1.51.0",
20+
"@theia/terminal": "1.51.0",
21+
"@theia/workspace": "1.51.0",
2222
"arduino-ide-extension": "2.3.5"
2323
},
2424
"devDependencies": {
25-
"@theia/cli": "1.50.1",
25+
"@theia/cli": "1.51.0",
2626
"7zip-min": "^1.4.4",
2727
"chmodr": "^1.2.0",
2828
"compression-webpack-plugin": "^9.0.0",

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"**/ip": "^2.0.1"
1818
},
1919
"devDependencies": {
20-
"@theia/cli": "1.50.1",
20+
"@theia/cli": "1.51.0",
2121
"@typescript-eslint/eslint-plugin": "^5.59.0",
2222
"@typescript-eslint/parser": "^5.59.0",
2323
"@xhmikosr/downloader": "^13.0.1",

0 commit comments

Comments
 (0)