Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
style(webv2): refine status bar widgets
joshistoast38e827e1cf4b
diff --git a/invokeai/frontend/webv2/src/theme/recipes.ts b/invokeai/frontend/webv2/src/theme/recipes.tsindex 215868fc24..0acfdb75e4 100644--- a/invokeai/frontend/webv2/src/theme/recipes.ts+++ b/invokeai/frontend/webv2/src/theme/recipes.ts@@ -219,9 +219,7 @@ export const rowRecipe = defineRecipe({export const chipRecipe = defineRecipe({base: {alignItems: 'center',- borderColor: 'border.emphasized',borderRadius: 'sm',- borderWidth: '1px',display: 'inline-flex',flexShrink: '0',fontSize: '2xs',@@ -234,11 +232,11 @@ export const chipRecipe = defineRecipe({variants: {tone: {neutral: {},- brand: { bg: 'brand.subtle', borderColor: 'transparent', color: 'brand.fg' },- accent: { borderColor: 'accent.solid', color: 'accent.solid' },- error: { borderColor: 'fg.error', color: 'fg.error' },- success: { borderColor: 'fg.success', color: 'fg.success' },- warning: { borderColor: 'fg.warning', color: 'fg.warning' },+ brand: { bg: 'brand.subtle', color: 'brand.fg' },+ accent: { color: 'accent.solid' },+ error: { color: 'fg.error' },+ success: { color: 'fg.success' },+ warning: { color: 'fg.warning' },},},defaultVariants: { tone: 'neutral' },diff --git a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsxindex 34fee10f5e..81d94fbda9 100644--- a/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/StatusBar.tsx@@ -2,7 +2,7 @@ import type { WidgetInstanceId } from '@workbench/types';import type { WidgetRegionDropState } from '@workbench/widgetDnd';import type { PlacedWidgetRegionItem } from '@workbench/widgetRegionViewModel';-import { Box, type BoxProps } from '@chakra-ui/react';+import { Box } from '@chakra-ui/react';import { horizontalListSortingStrategy } from '@dnd-kit/sortable';import { Row, Tooltip } from '@workbench/components/ui';import {@@ -105,7 +105,9 @@ export const StatusBar = ({ dropState }: { dropState: WidgetRegionDropState }) =}/>))}+<Box flex="1" />+<WidgetEnableMenucontextTarget={enableMenuTarget}groupLabel="Bottom Widgets"@@ -137,12 +139,14 @@ const CompactBottomWidget = ({onSelect: (widgetId: WidgetInstanceId) => void;}) => {const View = item.widget.manifest.view;- const { dragHandleProps, setNodeRef, style } = useWidgetSortable({+ const { dragHandleProps, isDragging, setNodeRef, style } = useWidgetSortable({instanceId: item.id,region: 'bottom',typeId: item.typeId,});- const rowDragHandleProps = item.isExpandable ? {} : dragHandleProps;+ const rowDragHandleProps = item.isExpandable+ ? Object.fromEntries(Object.entries(dragHandleProps).filter(([key]) => key !== 'onKeyDown'))+ : dragHandleProps;const activationProps = item.isExpandable? {role: 'button' as const,@@ -161,13 +165,13 @@ const CompactBottomWidget = ({}const content = (- <Box ref={setNodeRef} h="full" pe="1.5" style={style}>+ <Box ref={setNodeRef} h="full" style={style}><Row{...rowDragHandleProps}active={isActive ? 'accent' : 'none'}aria-label={item.label}aria-pressed={isActive}- cursor={item.isExpandable ? 'pointer' : 'grab'}+ cursor={isDragging ? 'grabbing' : item.isExpandable ? 'pointer' : 'default'}h="full"w="auto"_hover={{ color: isActive ? 'accent.contrast' : 'fg' }}@@ -179,7 +183,6 @@ const CompactBottomWidget = ({}}onContextMenu={(event) => onContextMenu(item, event)}>- {item.isExpandable ? <BottomWidgetDragHandle dragHandleProps={dragHandleProps} label={item.label} /> : null}{item.instance ? (<WidgetRenderer instance={item.instance} widget={item.widget} presentation="compact" region="bottom" />) : null}@@ -194,7 +197,6 @@ const CompactBottomWidget = ({content={item.failureMessage ? `${item.label}: ${item.failureMessage}` : item.label}openDelay={250}positioning={{ placement: 'top-start' }}- showArrow>{content}</Tooltip>@@ -211,28 +213,8 @@ const CompactBottomWidget = ({}openDelay={250}positioning={{ placement: 'top-start' }}- showArrow>{content}</Tooltip>);};--const BottomWidgetDragHandle = ({- dragHandleProps,- label,-}: {- dragHandleProps: Record<string, unknown>;- label: string;-}) => (- <Box- aria-label={`Drag ${label}`}- cursor="grab"- h="full"- role="button"- tabIndex={0}- w="1.5"- _active={{ cursor: 'grabbing' }}- {...(dragHandleProps as BoxProps)}- />-);diff --git a/invokeai/frontend/webv2/src/workbench/widgets/workflow/WorkflowWidgetView.tsx b/invokeai/frontend/webv2/src/workbench/widgets/workflow/WorkflowWidgetView.tsxindex 81900f393c..c20c3f7624 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/workflow/WorkflowWidgetView.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/workflow/WorkflowWidgetView.tsx@@ -23,7 +23,7 @@ const WorkflowStatusBarItem = () => {);return (- <HStack gap="1" maxW="14rem" minW="0">+ <HStack gap="1" maxW="14rem" minW="0" px="2"><Icon as={WorkflowIcon} boxSize="3" color={isRunning ? 'brand.solid' : undefined} flexShrink={0} /><Text fontSize="2xs" minW="0" truncate>{workflowName || 'Untitled Workflow'}