Skip to content

Commit 0f6488c

Browse files
committed
show sketchbook commands on hover
1 parent cf5e22d commit 0f6488c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@
3636
#arduino-sketchbook-tree-widget .theia-TreeNodeSegmentGrow {
3737
flex: 1;
3838
}
39+
40+
.theia-TreeNode .sketchbook-commands-icons {
41+
display: none;
42+
}
43+
44+
.theia-TreeNode:hover .sketchbook-commands-icons,
45+
.theia-TreeNode.theia-mod-selected .sketchbook-commands-icons {
46+
display: block;
47+
}

Diff for: arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,7 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
8787
}
8888

8989
protected renderInlineCommands(node: any, props: NodeProps): React.ReactNode {
90-
if (
91-
CloudSketchbookTree.CloudSketchDirNode.is(node) &&
92-
node.commands &&
93-
(node.id === this.hoveredNodeId ||
94-
this.currentSketchUri === node.uri.toString())
95-
) {
90+
if (CloudSketchbookTree.CloudSketchDirNode.is(node) && node.commands) {
9691
return Array.from(new Set(node.commands)).map((command) =>
9792
this.renderInlineCommand(command.id, node, {
9893
username: this.authenticationService.session?.account?.label,

Diff for: arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
142142
TREE_NODE_TAIL_CLASS,
143143
icon,
144144
'theia-tree-view-inline-action',
145+
'sketchbook-commands-icons',
145146
].join(' ');
146147
return (
147148
<div

0 commit comments

Comments
 (0)