Skip to content

Commit

Permalink
Add delete node icon to circular menu (#9264)
Browse files Browse the repository at this point in the history
Closes #9168, also adds `Show full menu` icon back and hides `edit comment`.

https://github.com/enso-org/enso/assets/6566674/43af88a7-2b08-4f7d-8f4a-f47b41e51b2e
  • Loading branch information
vitvakatu authored Mar 4, 2024
1 parent 8b889f0 commit 9ee4348
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/gui2/src/components/CircularMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const emit = defineEmits<{
'update:isVisualizationVisible': [isVisualizationVisible: boolean]
startEditing: []
startEditingComment: []
openFullMenu: []
delete: []
}>()
</script>

Expand All @@ -25,11 +27,21 @@ const emit = defineEmits<{
@pointerup.stop
@click.stop
>
<div v-if="!isFullMenuVisible" class="More" @pointerdown.stop="emit('openFullMenu')"></div>
<SvgIcon
v-if="isFullMenuVisible"
name="comment"
class="icon-container button slot2"
:alt="`Edit comment`"
@click.stop="emit('startEditingComment')"
/>
<SvgIcon
v-if="isFullMenuVisible"
name="trash2"
class="icon-container button slot4"
:alt="`Delete component`"
@click.stop="emit('delete')"
/>
<ToggleIcon
icon="eye"
class="icon-container button slot5"
Expand Down
2 changes: 2 additions & 0 deletions app/gui2/src/components/GraphEditor/GraphNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ const documentation = computed<string | undefined>({
@update:isVisualizationVisible="emit('update:visualizationVisible', $event)"
@startEditing="startEditingNode"
@startEditingComment="editingComment = true"
@openFullMenu="openFullMenu"
@delete="emit('delete')"
/>
<GraphVisualization
v-if="isVisualizationVisible"
Expand Down
1 change: 1 addition & 0 deletions app/gui2/src/components/GraphEditor/GraphNodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const uploadingFiles = computed<[FileName, File][]>(() => {
:edited="id === graphStore.editedNodeInfo?.id"
@pointerenter="hoverNode(id)"
@pointerleave="hoverNode(undefined)"
@delete="graphStore.deleteNodes([id])"
@dragging="nodeIsDragged(id, $event)"
@draggingCommited="dragging.finishDrag()"
@outputPortClick="graphStore.createEdgeFromOutput($event)"
Expand Down

0 comments on commit 9ee4348

Please sign in to comment.