From 765d99ac2f21569304ab7ea7248cfc65e6e80842 Mon Sep 17 00:00:00 2001
From: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date: Fri, 30 Aug 2024 23:10:36 +1000
Subject: [PATCH] feat(ui): remove entity list context menu (again)
stupid events
---
.../components/CanvasPanelContent.tsx | 23 ++++---------------
.../components/common/CanvasEntityHeader.tsx | 2 +-
2 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/invokeai/frontend/web/src/features/controlLayers/components/CanvasPanelContent.tsx b/invokeai/frontend/web/src/features/controlLayers/components/CanvasPanelContent.tsx
index dd2b43c37a..e1f435551e 100644
--- a/invokeai/frontend/web/src/features/controlLayers/components/CanvasPanelContent.tsx
+++ b/invokeai/frontend/web/src/features/controlLayers/components/CanvasPanelContent.tsx
@@ -1,37 +1,22 @@
-import { Box, ContextMenu, Divider, Flex, MenuList } from '@invoke-ai/ui-library';
+import { Divider, Flex } from '@invoke-ai/ui-library';
import { useAppSelector } from 'app/store/storeHooks';
import { CanvasAddEntityButtons } from 'features/controlLayers/components/CanvasAddEntityButtons';
import { CanvasEntityList } from 'features/controlLayers/components/CanvasEntityList/CanvasEntityList';
import { EntityListActionBar } from 'features/controlLayers/components/CanvasEntityList/EntityListActionBar';
-import { CanvasEntityListMenuItems } from 'features/controlLayers/components/CanvasEntityList/EntityListActionBarAddLayerMenuItems';
import { CanvasManagerProviderGate } from 'features/controlLayers/contexts/CanvasManagerProviderGate';
import { selectHasEntities } from 'features/controlLayers/store/selectors';
-import { memo, useCallback } from 'react';
+import { memo } from 'react';
export const CanvasPanelContent = memo(() => {
const hasEntities = useAppSelector(selectHasEntities);
- const renderMenu = useCallback(
- () => (
-
-
-
- ),
- []
- );
return (
- renderMenu={renderMenu}>
- {(ref) => (
-
- {!hasEntities && }
- {hasEntities && }
-
- )}
-
+ {!hasEntities && }
+ {hasEntities && }
);
diff --git a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityHeader.tsx b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityHeader.tsx
index 1948830a7b..4fe8867fd2 100644
--- a/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityHeader.tsx
+++ b/invokeai/frontend/web/src/features/controlLayers/components/common/CanvasEntityHeader.tsx
@@ -56,7 +56,7 @@ export const CanvasEntityHeader = memo(({ children, ...rest }: FlexProps) => {
}, [entityIdentifier]);
return (
-
+
{(ref) => (
{children}