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(webv2): keep the semantic search border tinted on hover
Josh Corbett7b859ef91db0
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsxindex 0ae2ae9a65..3d254a70a1 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GallerySearchField.tsx@@ -118,12 +118,11 @@ export const GallerySearchField = ({return (<InputShellaria-invalid={isInvalid || undefined}- bg={isSemantic ? 'bg.warning' : undefined}- borderColor={isSemantic ? 'fg.warning' : undefined}data-mode={mode}endElement={endElement}position="relative"startElement={isSemantic ? SEMANTIC_START_ELEMENT : SEARCH_START_ELEMENT}+ tone={isSemantic ? 'warning' : undefined}>{/* Flex-centred: Chakra reads a scale number in `lineHeight` as aunitless multiplier, which drops the text out of the field. */}diff --git a/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx b/invokeai/frontend/webv2/src/platform/ui/InputShell.tsxindex 2521c6514e..a14eaa7010 100644--- a/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/InputShell.tsx@@ -2,7 +2,7 @@ import type { BoxProps } from '@chakra-ui/react';import type { PointerEvent, ReactNode, Ref } from 'react';import { Box } from '@chakra-ui/react';-import { inputShellInteraction } from '@theme/recipes';+import { inputShellInteraction, warningInputShellInteraction } from '@theme/recipes';export interface InputShellProps extends BoxProps {ref?: Ref<HTMLDivElement>;@@ -10,6 +10,8 @@ export interface InputShellProps extends BoxProps {startElement?: ReactNode;/** Trailing adornments (clear/help buttons), outside the content cell. */endElement?: ReactNode;+ /** `warning` tints the fill and border for a distinct input mode. */+ tone?: 'warning';}/** Chrome clicks focus the field like a native input; adornment controls keep their own clicks. */@@ -29,14 +31,15 @@ const focusInnerInput = (event: PointerEvent<HTMLDivElement>) => {};/** Composite input chrome follows inner focus via focus-within; put aria-invalid on the shell for its error border. */-export const InputShell = ({ children, endElement, ref, startElement, ...boxProps }: InputShellProps) => (+export const InputShell = ({ children, endElement, ref, startElement, tone, ...boxProps }: InputShellProps) => (<Boxref={ref}alignItems="center"- borderColor="border"+ bg={tone === 'warning' ? 'bg.warning' : undefined}+ borderColor={tone === 'warning' ? 'fg.warning/60' : 'border'}borderRadius="control"borderWidth="1px"- css={inputShellInteraction}+ css={tone === 'warning' ? warningInputShellInteraction : inputShellInteraction}cursor="text"display="flex"gap="1.5"diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.tsindex 543406e21e..63748abe60 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts@@ -324,6 +324,12 @@ export const inputShellInteraction = {_hover: { ...formControlInteraction._hover, _focusWithin: formControlFocused },};+/** A mode-tinted shell (e.g. semantic search) keeps its tint on hover; focus and errors still win. */+export const warningInputShellInteraction = {+ ...inputShellInteraction,+ _hover: { ...inputShellInteraction._hover, borderColor: 'fg.warning' },+};+/** Scrubber borders follow keyboard/editor focus; pointer clicks use drag state instead. */export const scrubberInteraction = {...formControlInteraction,