From 1136b3a99bf7da6f31f16518c2fd5df371d96537 Mon Sep 17 00:00:00 2001 From: ajnart <49837342+ajnart@users.noreply.github.com> Date: Mon, 29 Jun 2026 15:09:19 +0200 Subject: [PATCH] =?UTF-8?q?fix(widgets):=20address=20CodeRabbit=20review?= =?UTF-8?q?=20=E2=80=94=20badge=20in=20context=20menu=20target,=20edit-onl?= =?UTF-8?q?y=20pending=20gate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move title badge inside WidgetContextMenu wrapper so right-clicking the title overlay also triggers the context menu - Remove full-menu hide during integration loading; only disable 'Edit' action while isPending - Add isPending to allActions useMemo dependency array --- .../components/board/items/item-content.tsx | 50 +++++++++---------- .../board/items/widget-context-menu.tsx | 4 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/apps/nextjs/src/components/board/items/item-content.tsx b/apps/nextjs/src/components/board/items/item-content.tsx index c82e94e8e..c78dc0baa 100644 --- a/apps/nextjs/src/components/board/items/item-content.tsx +++ b/apps/nextjs/src/components/board/items/item-content.tsx @@ -59,32 +59,32 @@ export const BoardItemContent = ({ item }: BoardItemContentProps) => { ); return ( - <> - + +
{cardElement} - - {item.advancedOptions.title?.trim() && ( - - {item.advancedOptions.title} - - )} - + {item.advancedOptions.title?.trim() && ( + + {item.advancedOptions.title} + + )} +
+
); }; diff --git a/apps/nextjs/src/components/board/items/widget-context-menu.tsx b/apps/nextjs/src/components/board/items/widget-context-menu.tsx index 4a3b87cf1..a4602ed40 100644 --- a/apps/nextjs/src/components/board/items/widget-context-menu.tsx +++ b/apps/nextjs/src/components/board/items/widget-context-menu.tsx @@ -153,6 +153,7 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont label: tItem("action.edit"), icon: IconPencil, onClick: openEditModal, + disabled: isPending, }); actions.push({ key: "moveResize", @@ -191,6 +192,7 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont return actions.filter((a) => !a.hidden); }, [ isEditMode, + isPending, autoToggleActions, widgetContextActions, openEditModal, @@ -202,8 +204,6 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont duplicateItem, ]); - if (isPending) return <>{children}; - return ( {children}