File tree 3 files changed +15
-17
lines changed
arduino-ide-extension/src/browser
3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 36
36
# arduino-sketchbook-tree-widget .theia-TreeNodeSegmentGrow {
37
37
flex : 1 ;
38
38
}
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
+ }
Original file line number Diff line number Diff line change @@ -86,13 +86,8 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
86
86
return classNames ;
87
87
}
88
88
89
- 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
- ) {
89
+ protected renderInlineCommands ( node : any ) : React . ReactNode {
90
+ if ( CloudSketchbookTree . CloudSketchDirNode . is ( node ) && node . commands ) {
96
91
return Array . from ( new Set ( node . commands ) ) . map ( ( command ) =>
97
92
this . renderInlineCommand ( command . id , node , {
98
93
username : this . authenticationService . session ?. account ?. label ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
84
84
return (
85
85
< React . Fragment >
86
86
{ super . renderTailDecorations ( node , props ) }
87
- { this . renderInlineCommands ( node , props ) }
87
+ { this . renderInlineCommands ( node ) }
88
88
</ React . Fragment >
89
89
) ;
90
90
}
@@ -107,15 +107,8 @@ export class SketchbookTreeWidget extends FileTreeWidget {
107
107
} ;
108
108
}
109
109
110
- protected renderInlineCommands (
111
- node : TreeNode ,
112
- props : NodeProps
113
- ) : React . ReactNode {
114
- if (
115
- SketchbookTree . SketchDirNode . is ( node ) &&
116
- ( ( node . commands && node . id === this . hoveredNodeId ) ||
117
- this . currentSketchUri === node ?. uri . toString ( ) )
118
- ) {
110
+ protected renderInlineCommands ( node : TreeNode ) : React . ReactNode {
111
+ if ( SketchbookTree . SketchDirNode . is ( node ) && node . commands ) {
119
112
return Array . from ( new Set ( node . commands ) ) . map ( ( command ) =>
120
113
this . renderInlineCommand ( command . id , node )
121
114
) ;
@@ -142,6 +135,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
142
135
TREE_NODE_TAIL_CLASS ,
143
136
icon ,
144
137
'theia-tree-view-inline-action' ,
138
+ 'sketchbook-commands-icons' ,
145
139
] . join ( ' ' ) ;
146
140
return (
147
141
< div
You can’t perform that action at this time.
0 commit comments