8000 [ATL-1599] [ATL-1416] Upgrade Theia to 1.18.0 by fstasi · Pull Request #489 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

[ATL-1599] [ATL-1416] Upgrade Theia to 1.18.0 #489

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 22 commits into from
Oct 6, 2021
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
show sketchbook commands on hover
  • Loading branch information
fstasi authored and Alberto Iannaccone committed Oct 5, 2021
commit eaa2653763a71f7eb2cffe3527301220ad3f8d68
9 changes: 9 additions & 0 deletions arduino-ide-extension/src/browser/style/sketchbook.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,12 @@
#arduino-sketchbook-tree-widget .theia-TreeNodeSegmentGrow {
flex: 1;
}

.theia-TreeNode .sketchbook-commands-icons {
display: none;
}

.theia-TreeNode:hover .sketchbook-commands-icons,
.theia-TreeNode.theia-mod-selected .sketchbook-commands-icons {
display: block;
}
8000
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,8 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
return classNames;
}

protected renderInlineCommands(node: any, props: NodeProps): React.ReactNode {
if (
CloudSketchbookTree.CloudSketchDirNode.is(node) &&
node.commands &&
(node.id === this.hoveredNodeId ||
this.currentSketchUri === node.uri.toString())
) {
protected renderInlineCommands(node: any): React.ReactNode {
if (CloudSketchbookTree.CloudSketchDirNode.is(node) && node.commands) {
return Array.from(new Set(node.commands)).map((command) =>
this.renderInlineCommand(command.id, node, {
username: this.authenticationService.session?.account?.label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
return (
<React.Fragment>
{super.renderTailDecorations(node, props)}
{this.renderInlineCommands(node, props)}
{this.renderInlineCommands(node)}
</React.Fragment>
);
}
Expand All @@ -107,15 +107,8 @@ export class SketchbookTreeWidget extends FileTreeWidget {
};
}

protected renderInlineCommands(
node: TreeNode,
props: NodeProps
): React.ReactNode {
if (
SketchbookTree.SketchDirNode.is(node) &&
((node.commands && node.id === this.hoveredNodeId) ||
this.currentSketchUri === node?.uri.toString())
) {
protected renderInlineCommands(node: TreeNode): React.ReactNode {
if (SketchbookTree.SketchDirNode.is(node) && node.commands) {
return Array.from(new Set(node.commands)).map((command) =>
this.renderInlineCommand(command.id, node)
);
Expand All @@ -142,6 +135,7 @@ export class SketchbookTreeWidget extends FileTreeWidget {
TREE_NODE_TAIL_CLASS,
icon,
'theia-tree-view-inline-action',
'sketchbook-commands-icons',
].join(' ');
return (
<div
Expand Down
0