fix(widgets): address CodeRabbit review — badge in context menu target, edit-only pending gate

- 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
This commit is contained in:
ajnart committed 2026-06-29 15:10:34 +02:00
1 parent bf26f17fcd
commit 1136b3a99b
2 files changed
+27 -27

No files matched your search

@@ -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 (
<Menu shadow="md" width={200}>
<Menu.ContextMenu>{children}</Menu.ContextMenu>