From 15ca182333c47866f61f5d1167cc1453d4d6d3ac Mon Sep 17 00:00:00 2001 From: David Luzar <5153846+dwelle@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:47:05 +0200 Subject: [PATCH] fix: remove export-to-clip-as-svg shortcut for now (#8660) --- packages/excalidraw/actions/actionClipboard.tsx | 1 - packages/excalidraw/actions/shortcuts.ts | 2 -- packages/excalidraw/components/HelpDialog.tsx | 4 ---- .../tests/__snapshots__/contextmenu.test.tsx.snap | 6 ------ 4 files changed, 13 deletions(-) diff --git a/packages/excalidraw/actions/actionClipboard.tsx b/packages/excalidraw/actions/actionClipboard.tsx index 0956747b9..c030b8150 100644 --- a/packages/excalidraw/actions/actionClipboard.tsx +++ b/packages/excalidraw/actions/actionClipboard.tsx @@ -182,7 +182,6 @@ export const actionCopyAsSvg = register({ predicate: (elements) => { return probablySupportsClipboardWriteText && elements.length > 0; }, - keyTest: (event) => event.code === CODES.C && event.ctrlKey && event.shiftKey, keywords: ["svg", "clipboard", "copy"], }); diff --git a/packages/excalidraw/actions/shortcuts.ts b/packages/excalidraw/actions/shortcuts.ts index 1f424fb57..e992f06a1 100644 --- a/packages/excalidraw/actions/shortcuts.ts +++ b/packages/excalidraw/actions/shortcuts.ts @@ -23,7 +23,6 @@ export type ShortcutName = | "sendToBack" | "bringToFront" | "copyAsPng" - | "copyAsSvg" | "group" | "ungroup" | "gridMode" @@ -88,7 +87,6 @@ const shortcutMap: Record = { : getShortcutKey("CtrlOrCmd+Shift+]"), ], copyAsPng: [getShortcutKey("Shift+Alt+C")], - copyAsSvg: [getShortcutKey("Shift+Ctrl+C")], group: [getShortcutKey("CtrlOrCmd+G")], ungroup: [getShortcutKey("CtrlOrCmd+Shift+G")], gridMode: [getShortcutKey("CtrlOrCmd+'")], diff --git a/packages/excalidraw/components/HelpDialog.tsx b/packages/excalidraw/components/HelpDialog.tsx index 7b0dff79f..886c7bb7a 100644 --- a/packages/excalidraw/components/HelpDialog.tsx +++ b/packages/excalidraw/components/HelpDialog.tsx @@ -374,10 +374,6 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => { shortcuts={[getShortcutKey("Shift+Alt+C")]} /> )} - right-clicking on a group should select whole gro /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard", @@ -4724,7 +4723,6 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard", @@ -5852,7 +5850,6 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard", @@ -6932,7 +6929,6 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard", @@ -7701,7 +7697,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard", @@ -8596,7 +8591,6 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap /> , - "keyTest": [Function], "keywords": [ "svg", "clipboard",