From 16993cd21686b83ba41af43f2393712101ef2a24 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:49:06 +1000 Subject: [PATCH] feat(ui): get all tabs working w/ new layout --- .../SimpleSession/WorkflowsLaunchpadPanel.tsx | 13 ++ .../features/nodes/components/NodeEditor.tsx | 33 +-- .../sidePanel/WorkflowsTabLeftPanel.tsx | 18 +- .../queue/components/QueueTabContent.tsx | 13 +- .../components/HotkeysModal/useHotkeyData.ts | 11 +- .../src/features/ui/components/AppContent.tsx | 44 +++- .../components/tabs/WorkflowsTabContent.tsx | 7 +- .../ui/layouts/workflows-tab-auto-layout.tsx | 203 ++++++++++++++++++ 8 files changed, 288 insertions(+), 54 deletions(-) create mode 100644 invokeai/frontend/web/src/features/controlLayers/components/SimpleSession/WorkflowsLaunchpadPanel.tsx create mode 100644 invokeai/frontend/web/src/features/ui/layouts/workflows-tab-auto-layout.tsx diff --git a/invokeai/frontend/web/src/features/controlLayers/components/SimpleSession/WorkflowsLaunchpadPanel.tsx b/invokeai/frontend/web/src/features/controlLayers/components/SimpleSession/WorkflowsLaunchpadPanel.tsx new file mode 100644 index 0000000000..e048d94d6c --- /dev/null +++ b/invokeai/frontend/web/src/features/controlLayers/components/SimpleSession/WorkflowsLaunchpadPanel.tsx @@ -0,0 +1,13 @@ +import { Flex, Heading } from '@invoke-ai/ui-library'; +import { memo } from 'react'; + +export const WorkflowsLaunchpadPanel = memo(() => { + return ( + + + Go deep with Workflows. + + + ); +}); +WorkflowsLaunchpadPanel.displayName = 'WorkflowsLaunchpadPanel'; diff --git a/invokeai/frontend/web/src/features/nodes/components/NodeEditor.tsx b/invokeai/frontend/web/src/features/nodes/components/NodeEditor.tsx index 168af9dff9..96a4c5cd0b 100644 --- a/invokeai/frontend/web/src/features/nodes/components/NodeEditor.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/NodeEditor.tsx @@ -1,4 +1,5 @@ import type { SystemStyleObject } from '@invoke-ai/ui-library'; +import { ReactFlowProvider } from '@xyflow/react'; import { FocusRegionWrapper } from 'common/components/FocusRegionWrapper'; import { IAINoContentFallback } from 'common/components/IAIImageFallback'; import { AddNodeCmdk } from 'features/nodes/components/flow/AddNodeCmdk/AddNodeCmdk'; @@ -29,21 +30,23 @@ const NodeEditor = () => { const { t } = useTranslation(); return ( - - {data && ( - <> - - - - - - - - - )} - - {isLoading && } - + + + {data && ( + <> + + + + + + + + + )} + + {isLoading && } + + ); }; diff --git a/invokeai/frontend/web/src/features/nodes/components/sidePanel/WorkflowsTabLeftPanel.tsx b/invokeai/frontend/web/src/features/nodes/components/sidePanel/WorkflowsTabLeftPanel.tsx index dd114a22aa..5a20867115 100644 --- a/invokeai/frontend/web/src/features/nodes/components/sidePanel/WorkflowsTabLeftPanel.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/sidePanel/WorkflowsTabLeftPanel.tsx @@ -8,6 +8,7 @@ import { PublishWorkflowPanelContent } from 'features/nodes/components/sidePanel import { ActiveWorkflowDescription } from 'features/nodes/components/sidePanel/WorkflowListMenu/ActiveWorkflowDescription'; import { ActiveWorkflowNameAndActions } from 'features/nodes/components/sidePanel/WorkflowListMenu/ActiveWorkflowNameAndActions'; import { selectWorkflowMode } from 'features/nodes/store/workflowLibrarySlice'; +import QueueControls from 'features/queue/components/QueueControls'; import { memo } from 'react'; import { ViewModeLeftPanelContent } from './viewMode/ViewModeLeftPanelContent'; @@ -18,13 +19,16 @@ const WorkflowsTabLeftPanel = () => { const isInPublishFlow = useStore($isInPublishFlow); return ( - - {isInPublishFlow && } - {!isInPublishFlow && } - {!isInPublishFlow && !isPublished && mode === 'view' && } - {!isInPublishFlow && !isPublished && mode === 'view' && } - {!isInPublishFlow && !isPublished && mode === 'edit' && } - {isPublished && } + + + + {isInPublishFlow && } + {!isInPublishFlow && } + {!isInPublishFlow && !isPublished && mode === 'view' && } + {!isInPublishFlow && !isPublished && mode === 'view' && } + {!isInPublishFlow && !isPublished && mode === 'edit' && } + {isPublished && } + ); }; diff --git a/invokeai/frontend/web/src/features/queue/components/QueueTabContent.tsx b/invokeai/frontend/web/src/features/queue/components/QueueTabContent.tsx index 73a8dfc401..2dae5e6ebe 100644 --- a/invokeai/frontend/web/src/features/queue/components/QueueTabContent.tsx +++ b/invokeai/frontend/web/src/features/queue/components/QueueTabContent.tsx @@ -1,7 +1,5 @@ import { Box, Flex } from '@invoke-ai/ui-library'; -import { useAppSelector } from 'app/store/storeHooks'; import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus'; -import { selectActiveTab } from 'features/ui/store/uiSelectors'; import { memo } from 'react'; import InvocationCacheStatus from './InvocationCacheStatus'; @@ -11,18 +9,9 @@ import QueueTabQueueControls from './QueueTabQueueControls'; const QueueTabContent = () => { const isInvocationCacheEnabled = useFeatureStatus('invocationCache'); - const activeTabName = useAppSelector(selectActiveTab); return ( -