From d6f5938c9ccc4164ef9d895b8b823fc24c2bc0c3 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Fri, 10 Oct 2025 22:17:23 +0200 Subject: [PATCH] refactor: remove edit properties from context menus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the "Edit Properties" option from both node and edge context menus, leaving only the "Delete" option. Users can simply click on nodes/edges to select them and edit properties in the right panel, making the context menu option redundant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/components/Editor/GraphEditor.tsx | 39 --------------------------- 1 file changed, 39 deletions(-) diff --git a/src/components/Editor/GraphEditor.tsx b/src/components/Editor/GraphEditor.tsx index b5dafc1..18ca03e 100644 --- a/src/components/Editor/GraphEditor.tsx +++ b/src/components/Editor/GraphEditor.tsx @@ -31,7 +31,6 @@ import CustomEdge from "../Edges/CustomEdge"; import ContextMenu from "./ContextMenu"; import EmptyState from "../Common/EmptyState"; import { createNode } from "../../utils/nodeUtils"; -import EditIcon from "@mui/icons-material/Edit"; import DeleteIcon from "@mui/icons-material/Delete"; import { useConfirm } from "../../hooks/useConfirm"; @@ -621,25 +620,6 @@ const GraphEditor = ({ onNodeSelect, onEdgeSelect, onAddNodeRequest }: GraphEdit sections={[ { actions: [ - { - label: "Edit Properties", - icon: , - onClick: () => { - // Select the node in ReactFlow (which will trigger the right panel) - const nodeId = contextMenu.target!.id; - const updatedNodes = nodes.map((n) => ({ - ...n, - selected: n.id === nodeId, - })); - const updatedEdges = edges.map((e) => ({ - ...e, - selected: false, - })); - setNodesState(updatedNodes as Node[]); - setEdgesState(updatedEdges as Edge[]); - setContextMenu(null); - }, - }, { label: "Delete", icon: , @@ -672,25 +652,6 @@ const GraphEditor = ({ onNodeSelect, onEdgeSelect, onAddNodeRequest }: GraphEdit sections={[ { actions: [ - { - label: "Edit Properties", - icon: , - onClick: () => { - // Select the edge in ReactFlow (which will trigger the right panel) - const edgeId = contextMenu.target!.id; - const updatedEdges = edges.map((e) => ({ - ...e, - selected: e.id === edgeId, - })); - const updatedNodes = nodes.map((n) => ({ - ...n, - selected: false, - })); - setEdgesState(updatedEdges as Edge[]); - setNodesState(updatedNodes as Node[]); - setContextMenu(null); - }, - }, { label: "Delete", icon: ,