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
feat(ui): run neighbouring borders under the Invoke button
Josh Corbett191f1669811b
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/IterationsField.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/IterationsField.tsxindex 66533dc3ef..dd4a74e257 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/IterationsField.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/IterationsField.tsx@@ -6,6 +6,7 @@ import { useActiveProjectSelector, useWorkbenchCommands } from '@workbench/Workbimport { useCallback } from 'react';import { useTranslation } from 'react-i18next';+import { TAIL_UNDER_INVOKE_AFTER_CSS } from './invokeClusterCss';import { getBatchCount } from './useInvocationState';export const IterationsField = () => {@@ -40,6 +41,7 @@ export const IterationsField = () => {<Tooltip content={t('topbar.iterations.tooltip', { count: batchCount })} showArrow><NumberInput.RootallowMouseWheel+ css={TAIL_UNDER_INVOKE_AFTER_CSS}flexShrink={0}min={MIN_BATCH_COUNT}rounded="control"diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/RoutingControl.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/RoutingControl.tsxindex 6148ed6726..a176b05a19 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/RoutingControl.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/RoutingControl.tsx@@ -15,6 +15,7 @@ import { useTranslation } from 'react-i18next';import type { InvocationState } from './useInvocationState';+import { TAIL_UNDER_INVOKE_BEFORE_CSS } from './invokeClusterCss';import { RoutingDestinationSegments } from './RoutingDestinationSegments';const MENU_POSITIONING = { placement: 'bottom-end' } as const;@@ -56,6 +57,7 @@ export const RoutingControl = ({ state }: { state: InvocationState }) => {<Menu.Trigger asChild><Buttonaria-label={accessibleName}+ css={TAIL_UNDER_INVOKE_BEFORE_CSS}data-routing-control=""flexShrink={0}maxW="36px"diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/invokeClusterCss.ts b/invokeai/frontend/webv2/src/workbench/shell/topbar/invokeClusterCss.tsindex 8c0e7821a9..bfea27f0f6 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/invokeClusterCss.ts+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/invokeClusterCss.ts@@ -1,4 +1,50 @@-/** Invoke keeps full control corners while it sits inside its attached cluster. */+/**+ * Invoke sits on top of its attached neighbours with full control corners. Each neighbour hides the edge facing+ * Invoke (it would show in the corners as a bracket) and runs a tail of its frame under the button, so the corners+ * reveal a continuing border instead of a notch.+ *//** Doubled specificity outranks the attached Group's `!important` corner reset. */export const INVOKE_BUTTON_CSS = { '&&': { borderRadius: 'control !important' } } as const;++const TAIL = {+ borderBlockWidth: '1px',+ content: '""',+ pointerEvents: 'none',+ position: 'absolute',+} as const;++/**+ * For the number input before Invoke. Its surface is a transparent outline input (a replaced element, so the root+ * carries the tail); the tail overlaps the input by 2px so the opaque border rows join without a sub-pixel seam.+ */+export const TAIL_UNDER_INVOKE_AFTER_CSS = {+ '& input': { borderInlineEndColor: 'transparent' },+ '&::after': {+ ...TAIL,+ borderColor: 'border',+ insetBlock: 0,+ insetInlineStart: 'calc(100% - 2px)',+ width: 'calc({radii.control} + 2px)',+ },+} as const;++/**+ * For a button after Invoke; its edge stays as a transparent 1px border so the content box stays centred. The tail+ * inherits the surface so hover and active states carry under the corners. It covers that edge column with its border+ * rows (no mitred corner) but clips its fill off the column, where the button's translucent fill would double.+ */+export const TAIL_UNDER_INVOKE_BEFORE_CSS = {+ borderInlineStartColor: 'transparent',+ '&::before': {+ ...TAIL,+ backgroundClip: 'content-box',+ backgroundColor: 'inherit',+ borderBlockColor: 'inherit',+ // Offsets resolve inside the button's border; step out so the tail continues its rows and spans its edge column.+ insetBlock: '-1px',+ insetInlineEnd: '100%',+ paddingInlineEnd: '1px',+ width: 'calc({radii.control} + 2px)',+ },+} as const;