File tree Expand file tree Collapse file tree 3 files changed +15
-17
lines changed
arduino-ide-extension/src/browser Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change @@ -86,13 +86,8 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
8686 return classNames ;
8787 }
8888
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 ) {
9691 return Array . from ( new Set ( node . commands ) ) . map ( ( command ) =>
9792 this . renderInlineCommand ( command . id , node , {
9893 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 {
8484 return (
8585 < React . Fragment >
8686 { super . renderTailDecorations ( node , props ) }
87- { this . renderInlineCommands ( node , props ) }
87+ { this . renderInlineCommands ( node ) }
8888 </ React . Fragment >
8989 ) ;
9090 }
@@ -107,15 +107,8 @@ export class SketchbookTreeWidget extends FileTreeWidget {
107107 } ;
108108 }
109109
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 ) {
119112 return Array . from ( new Set ( node . commands ) ) . map ( ( command ) =>
120113 this . renderInlineCommand ( command . id , node )
121114 ) ;
@@ -142,6 +135,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
142135 TREE_NODE_TAIL_CLASS ,
143136 icon ,
144137 'theia-tree-view-inline-action' ,
138+ 'sketchbook-commands-icons' ,
145139 ] . join ( ' ' ) ;
146140 return (
147141 < div
You can’t perform that action at this time.
0 commit comments