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
fix(ui): compact SegmentTabs in embedded locations
Josh Corbett899461ee77f9
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryViewTabs.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryViewTabs.tsxindex 1a5849d9cd..b1162888a3 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryViewTabs.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryViewTabs.tsx@@ -64,6 +64,7 @@ export const GalleryViewTabs = ({ idBase }: { idBase: string }) => {activeId={gallery.galleryView}ariaLabel={t('common.view')}idBase={idBase}+ isCompacttabs={tabs}onSelect={handleViewChange}/>diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsButton.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsButton.tsxindex 51f9477a5a..09700e76c1 100644--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsButton.tsx+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsButton.tsx@@ -112,6 +112,7 @@ export const DynamicPromptsButton = ({activeId={tab}ariaLabel={t('widgets.generate.dynamicPrompts.title')}idBase={tabsIdBase}+ isCompacttabs={tabItems}onSelect={handleTabChange}/>diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewDialog.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewDialog.tsxindex 016a2e8148..896c3ec1a6 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewDialog.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewDialog.tsx@@ -222,6 +222,7 @@ export const GraphPreviewDialog = ({activeId={mode}ariaLabel={t('graphPreview.title')}idBase={modeTabsIdBase}+ isCompacttabs={modeTabs}onSelect={handleModeChange}/>diff --git a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsxindex ae198640e7..356113943a 100644--- a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx@@ -49,6 +49,7 @@ export const SegmentTabs = <T extends string>({activeId,ariaLabel,idBase,+ isCompact = false,onSelect,showActivePanel = true,tabs,@@ -57,12 +58,21 @@ export const SegmentTabs = <T extends string>({activeId: T;ariaLabel: string;idBase: string;+ /** Embedded strips (popovers, dialog headers) drop the panel-strip height and outer padding. */+ isCompact?: boolean;onSelect: (id: T) => void;showActivePanel?: boolean;tabs: readonly SegmentTab<T>[];trailing?: ReactNode;}) => (- <HStack align="center" flexShrink={0} gap="0.5" h={`${SEGMENT_TABS_HEIGHT_PX}px`} minW="0" px="1.5">+ <HStack+ align="center"+ flexShrink={0}+ gap="0.5"+ h={isCompact ? '8' : `${SEGMENT_TABS_HEIGHT_PX}px`}+ minW="0"+ px={isCompact ? '0' : '1.5'}+ ><HStackaria-label={ariaLabel}aria-orientation="horizontal"