From 8020e16ca1daae73d8cd4c07fdaa54ba1ceb88df Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Sat, 28 Feb 2026 17:38:43 -0600 Subject: [PATCH] Temporarily removed table control bubble --- src/components/SlashMenu.tsx | 48 +++++++++++++++++++++++++++++++++++ src/components/TaskEditor.tsx | 24 +----------------- 2 files changed, 49 insertions(+), 23 deletions(-) diff --git a/src/components/SlashMenu.tsx b/src/components/SlashMenu.tsx index a5379ac..2b383d7 100644 --- a/src/components/SlashMenu.tsx +++ b/src/components/SlashMenu.tsx @@ -215,6 +215,54 @@ export const getSuggestionItems = ({ query }: { query: string }): CommandItem[] editor.chain().focus().deleteRange(range).setTextAlign("right").run(); }, }, + { + title: "Add Row Above", + description: "Insert a new row above the cursor.", + icon: Grid3X3, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).addRowBefore().run(); + }, + }, + { + title: "Add Row Below", + description: "Insert a new row below the cursor.", + icon: Grid3X3, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).addRowAfter().run(); + }, + }, + { + title: "Delete Row", + description: "Delete the current row.", + icon: Trash2, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).deleteRow().run(); + }, + }, + { + title: "Add Column Left", + description: "Insert a new column to the left.", + icon: Grid3X3, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).addColumnBefore().run(); + }, + }, + { + title: "Add Column Right", + description: "Insert a new column to the right.", + icon: Grid3X3, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).addColumnAfter().run(); + }, + }, + { + title: "Delete Column", + description: "Delete the current column.", + icon: Trash2, + command: ({ editor, range }: { editor: any, range: any }) => { + editor.chain().focus().deleteRange(range).deleteColumn().run(); + }, + }, { title: "Delete Table", description: "Delete the entire table.", diff --git a/src/components/TaskEditor.tsx b/src/components/TaskEditor.tsx index f13abd7..62a5fe2 100644 --- a/src/components/TaskEditor.tsx +++ b/src/components/TaskEditor.tsx @@ -6,7 +6,7 @@ import TaskList from "@tiptap/extension-task-list"; import { CustomTaskItem } from "./CustomTaskItem"; import Image from "@tiptap/extension-image"; import Underline from "@tiptap/extension-underline"; -import { X, Trash2, ArrowUpToLine, ArrowDownToLine, ArrowLeftToLine, ArrowRightToLine } from "lucide-solid"; +import { X } from "lucide-solid"; import { cn } from "@/lib/utils"; import { store } from "@/store"; @@ -24,7 +24,6 @@ import { TableCell } from "@tiptap/extension-table-cell"; import { TableHeader } from "@tiptap/extension-table-header"; import { Typography } from "@tiptap/extension-typography"; import { Dropcursor } from "@tiptap/extension-dropcursor"; -import { BubbleMenu } from "@tiptap/extension-bubble-menu"; import { Mention } from "@tiptap/extension-mention"; import { userSuggestion, noteSuggestion } from "@/lib/mention-suggestion"; @@ -40,7 +39,6 @@ interface TaskEditorProps { export const TaskEditor: Component = (props) => { let editorRef: HTMLDivElement | undefined; - let tableMenuRef: HTMLDivElement | undefined; const [fullscreenImage, setFullscreenImage] = createSignal(null); const [zoomScale, setZoomScale] = createSignal(1); const [zoomOffset, setZoomOffset] = createSignal({ x: 0, y: 0 }); @@ -157,12 +155,6 @@ export const TaskEditor: Component = (props) => { class: "note-mention bg-muted text-muted-foreground font-medium py-0.5 px-1 rounded-md border border-border italic cursor-pointer hover:bg-muted/80", }, }), - BubbleMenu.configure({ - element: tableMenuRef!, - shouldShow: ({ editor }) => editor.isActive("table"), - // @ts-ignore - Solid-tiptap types might be outdated - tippyOptions: { placement: "bottom", duration: 100 }, - }), Dropcursor.configure({ color: "var(--primary)", width: 2, @@ -275,20 +267,6 @@ export const TaskEditor: Component = (props) => { }} /> - {/* Table Bubble Menu */} -