Skip to content

Commit

Permalink
descriptions: fix background and add remove command
Browse files Browse the repository at this point in the history
  • Loading branch information
progrium committed Aug 18, 2023
1 parent d20e733 commit 68221e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/com/description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ export class Description {
ctx.node.changed();
}
});
workbench.commands.registerCommand({
id: "remove-description",
title: "Remove Description",
when: (ctx: Context) => {
if (!ctx.node) return false;
if (ctx.path.previous && objectManaged(ctx.path.previous)) return false;
if (ctx.node.hasComponent(Description)) return true;
return false;
},
action: (ctx: Context, name: string) => {
ctx.node.removeComponent(Description);
ctx.node.changed();
}
});
}
}

Expand Down
1 change: 1 addition & 0 deletions web/static/app/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ with their icon for Safari only*/
font-size: 13px;
border: 0;
outline: 0;
background: transparent;
}
/*todo: check unused textarea styles in panel.tsx*/
.text-editor > textarea, .text-editor > span {
Expand Down

0 comments on commit 68221e7

Please sign in to comment.