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
refactor(ui): take hand-built control heights from the size scale
Josh Corbettdd4d466a1285
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsxindex d7e6a5d593..7860bd49b8 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx@@ -166,7 +166,7 @@ export const GallerySearchField = ({borderRadius="0"caretColor="fg"color="transparent"- h="7"+ h="control.md"minW="0"px="0"_placeholder={PLACEHOLDER_PROPS}diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerPopover.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerPopover.tsxindex 9fe8047add..11a1862d24 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerPopover.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/picker/GalleryPickerPopover.tsx@@ -18,8 +18,8 @@ const POSITIONING = { placement: 'bottom-start' } as const;/** Same header and search footprint as the view, so the popover does not jump when it lands. */const PICKER_FALLBACK = (<Stack aria-busy="true" gap="2" p="2">- <Skeleton h="7" rounded="control" />- <Skeleton h="7" rounded="control" />+ <Skeleton h="control.md" rounded="control" />+ <Skeleton h="control.md" rounded="control" /><Skeleton h="10rem" rounded="md" /></Stack>);diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsxindex 913347f2b5..358599f56d 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx@@ -2048,7 +2048,7 @@ export const WorkflowFieldSnapshot = ({borderWidth="1px"data-workflow-export-field-value="true"fontFamily={template.uiComponent === 'textarea' ? 'mono' : undefined}- minH="7"+ minH="control.md"minW="0"mt="0.5"overflowWrap="anywhere"diff --git a/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx b/invokeai/frontend/webv2/src/platform/ui/InputShell.tsxindex 7e7c46e563..0facfacb33 100644--- a/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx@@ -43,7 +43,7 @@ export const InputShell = ({ children, endElement, ref, startElement, tone, ...bcursor="text"display="flex"gap="1.5"- h="7"+ h="control.md"minW="0"// Trailing buttons own their inset; omit duplicate end padding.pe={endElement ? '1' : '2'}diff --git a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsxindex eae4796fe6..b7a6ee1857 100644--- a/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/ScrubberField.tsx@@ -90,7 +90,7 @@ const ROOT_CSS = {borderWidth: '1px',cursor: 'ew-resize',display: 'flex',- h: '7',+ h: 'control.md',minW: '0',overflow: 'hidden',position: 'relative',diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsxindex 47668663de..f24f541f13 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/AppMenu.tsx@@ -187,11 +187,11 @@ const SettingsMenuAction = ({ onClick }: { onClick: () => void }) => {const FOOTER_ITEM_PROPS = {alignItems: 'center',flex: '0 0 auto',- h: '7',+ h: 'control.md',justifyContent: 'center',- minW: '7',+ minW: 'control.md',p: '0',- w: '7',+ w: 'control.md',} as const;const AppMenuAction = ({diff --git a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/FormControls.tsx b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/FormControls.tsxindex 8653d6052a..c375da5ffb 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/FormControls.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/FormControls.tsx@@ -5,6 +5,7 @@ import type { KeyboardEvent, ReactNode } from 'react';import { Box, Flex, Icon, InputGroup, NumberInput } from '@chakra-ui/react';import { Button } from '@platform/ui/Button';import { Slider } from '@platform/ui/Slider';+import { CONTROL_HEIGHT_PX } from '@theme/scale';import { MoveHorizontalIcon } from 'lucide-react';import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -29,8 +30,8 @@ interface FormNumberFieldProps {}const AFFIX_PROPS = { color: 'fg.muted', fontSize: 'xs', lineHeight: '1' } as const;-// InputGroup pads the input by `--input-height` (28px at size md) minus the offset; the text must clear the affix.-const INPUT_HEIGHT_PX = 28;+// InputGroup pads the input by `--input-height` minus the offset; the text must clear the affix.+const INPUT_HEIGHT_PX = CONTROL_HEIGHT_PX.md;const AFFIX_CHAR_PX = 6;const AFFIX_GUTTER_PX = 8;const affixOffset = (chars: number): string => `${INPUT_HEIGHT_PX - AFFIX_GUTTER_PX - chars * AFFIX_CHAR_PX}px`;diff --git a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/PropertyPrimitives.tsx b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/PropertyPrimitives.tsxindex 55d26a1d0c..e1802f6cc2 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/PropertyPrimitives.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-presentation/PropertyPrimitives.tsx@@ -15,7 +15,7 @@ const GROUP_HEADER_HOVER = { color: 'fg' } as const;* preserve continuation alignment.*/export const PropertyControlRow = ({ children, label }: { children: ReactNode; label?: string }) => (- <Grid alignItems="center" columnGap="2" gridTemplateColumns="4.5rem minmax(0, 1fr) auto" minH="7" w="full">+ <Grid alignItems="center" columnGap="2" gridTemplateColumns="4.5rem minmax(0, 1fr) auto" minH="control.md" w="full"><Text color="fg.muted" minW="0" title={label} truncate>{label}</Text>@@ -44,7 +44,7 @@ export const PropertySwitchRow = ({checked={checked}disabled={disabled}justifyContent="space-between"- minH="7"+ minH="control.md"w="full"onCheckedChange={handleChange}>diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsxindex 3d986c4f2b..dfd96301aa 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/LayerBlendRow.tsx@@ -15,8 +15,8 @@ import { useTranslation } from 'react-i18next';type LayerBlendRowEngine = Pick<CanvasEngineHandle, 'document' | 'exports' | 'interaction' | 'layers' | 'projectId'>;const SELECT_POSITIONING = { placement: 'bottom-start', sameWidth: true } as const;-const BLEND_TRIGGER_PROPS = { fontSize: 'md', h: '7', minH: '7' } as const;-const OPACITY_INPUT_PROPS = { fontSize: 'md', h: '7' } as const;+const BLEND_TRIGGER_PROPS = { fontSize: 'md', h: 'control.md', minH: 'control.md' } as const;+const OPACITY_INPUT_PROPS = { fontSize: 'md', h: 'control.md' } as const;const clamp01 = (value: number): number => Math.min(1, Math.max(0, value));