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): add an accent-tinted bg.hover token for pointed rows
Josh Corbett95af653794cd
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardRowShell.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardRowShell.tsxindex 236a84e3a9..8294193a00 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardRowShell.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardRowShell.tsx@@ -7,8 +7,8 @@ import { useMemo, type MouseEvent, type ReactNode, type Ref } from 'react';const ROW_CONTAINER_CSS = {'&:hover .board-row-actions, &:focus-within .board-row-actions': { opacity: 1 },'&:hover .board-row-hover, &:focus-within .board-row-hover': { opacity: 1 },- // A tint rather than a surface token: the picker popover's own background is bg.muted, which hid the hover there.- _hover: { bg: 'gray.hoverTint/10' },+ // A translucent tint, not an opaque surface: the picker popover's own background is bg.muted, which hid one there.+ _hover: { bg: 'bg.hover' },borderRadius: 'sm',transition: 'background var(--wb-motion-duration-fast) ease',} as const;diff --git a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsxindex ecf21cba92..7ef1f0a11a 100644--- a/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx+++ b/invokeai/frontend/webv2/src/platform/ui/SegmentTabs.tsx@@ -5,7 +5,7 @@ import { Fragment, useCallback } from 'react';import { Tooltip } from './Tooltip';-const TAB_HOVER_PROPS = { bg: 'gray.hoverTint/8', color: 'fg' };+const TAB_HOVER_PROPS = { bg: 'bg.hover', color: 'fg' };const TAB_SHOWN_BG = 'gray.hoverTint/15';/** The strip's fixed height; collapsed blocks and drag snaps size against it. */diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json b/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.jsonindex cc8969b03c..e962a4a514 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json+++ b/invokeai/frontend/webv2/src/platform/ui/theme/__fixtures__/legacyTokenBaseline.json@@ -6,6 +6,7 @@"bg.panel": "oklch(28.8% 0.018 264.3)","bg.emphasized": "oklch(34% 0.02 264.3)","bg.inset": "oklch(18.8% 0.014 264.4)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(77.738% 0.1 231.76) 40%, oklch(96% 0.006 264.5)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(70.61% 0.0841 19.38) 14%, oklch(23.8% 0.016 264.35))","bg.success": "color-mix(in oklab, oklch(79.8% 0.1132 141.63) 14%, oklch(23.8% 0.016 264.35))","bg.warning": "color-mix(in oklab, oklch(76.62% 0.0612 62.9) 14%, oklch(23.8% 0.016 264.35))",@@ -53,6 +54,7 @@"bg.panel": "oklch(97% 0.003 264)","bg.emphasized": "oklch(93.5% 0.005 264)","bg.inset": "oklch(96% 0.0038 264)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(54.615% 0.2152 262.88) 40%, oklch(22.5% 0.013 264)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(55.509% 0.1707 24.62) 14%, oklch(99.4% 0.002 264))","bg.success": "color-mix(in oklab, oklch(53% 0.15 150) 14%, oklch(99.4% 0.002 264))","bg.warning": "color-mix(in oklab, oklch(60% 0.13 72) 14%, oklch(99.4% 0.002 264))",@@ -100,6 +102,7 @@"bg.panel": "oklch(21% 0.021 184)","bg.emphasized": "oklch(25.5% 0.026 183)","bg.inset": "oklch(16.5% 0.015 184)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(72% 0.105 195) 40%, oklch(92% 0.028 178)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(69.5% 0.147 33) 14%, oklch(18.5% 0.017 184))","bg.success": "color-mix(in oklab, oklch(78% 0.15 155) 14%, oklch(18.5% 0.017 184))","bg.warning": "color-mix(in oklab, oklch(80% 0.12 78) 14%, oklch(18.5% 0.017 184))",@@ -147,6 +150,7 @@"bg.panel": "oklch(22.213% 0 0)","bg.emphasized": "oklch(27.274% 0 0)","bg.inset": "oklch(18.22% 0 0)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(68.622% 0 0) 40%, oklch(93.1% 0 0)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(71.115% 0.0934 19.64) 14%, oklch(20.019% 0 0))","bg.success": "color-mix(in oklab, oklch(76% 0.06 150) 14%, oklch(20.019% 0 0))","bg.warning": "color-mix(in oklab, oklch(79% 0.07 80) 14%, oklch(20.019% 0 0))",@@ -194,6 +198,7 @@"bg.panel": "oklch(14.5% 0.003 250)","bg.emphasized": "oklch(19% 0.004 250)","bg.inset": "oklch(0% 0 0)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(80.623% 0.1248 228.24) 40%, oklch(89% 0.008 250)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(71.161% 0.1812 22.84) 14%, oklch(11.5% 0.003 250))","bg.success": "color-mix(in oklab, oklch(76.5% 0.16 150.5) 14%, oklch(11.5% 0.003 250))","bg.warning": "color-mix(in oklab, oklch(79.5% 0.13 80) 14%, oklch(11.5% 0.003 250))",@@ -241,6 +246,7 @@"bg.panel": "oklch(24.29% 0.0304 283.91)","bg.emphasized": "oklch(32.4% 0.0319 281.98)","bg.inset": "oklch(18.28% 0.0204 284.2)",+ "bg.hover": "color-mix(in oklab, color-mix(in oklab, oklch(76.64% 0.1113 259.88) 40%, oklch(87.87% 0.0426 272.28)) 8%, transparent)","bg.error": "color-mix(in oklab, oklch(75.56% 0.1297 2.76) 14%, oklch(21.55% 0.0254 284.06))","bg.success": "color-mix(in oklab, oklch(85.77% 0.1092 142.72) 14%, oklch(21.55% 0.0254 284.06))","bg.warning": "color-mix(in oklab, oklch(82.37% 0.1015 52.63) 14%, oklch(21.55% 0.0254 284.06))",diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/__tokenResolve.ts b/invokeai/frontend/webv2/src/platform/ui/theme/__tokenResolve.tsindex 84641c94d4..1d82def608 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/__tokenResolve.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/__tokenResolve.ts@@ -81,6 +81,7 @@ export const CONSUMER_TOKENS = ['bg.panel','bg.emphasized','bg.inset',+ 'bg.hover','bg.error','bg.success','bg.warning',diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.tsindex c143e08204..35b3511ea2 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts@@ -910,7 +910,7 @@ const rowSurface = {transition: 'background var(--wb-motion-duration-fast) ease, color var(--wb-motion-duration-fast) ease',w: 'full',// Keep the pointed fill below selected emphasis so pointing does not resemble selection.- [ROW_POINTED]: { bg: 'bg.muted/60' },+ [ROW_POINTED]: { bg: 'bg.hover' },_disabled: { cursor: 'not-allowed', opacity: 0.5 },} as const;diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts b/invokeai/frontend/webv2/src/platform/ui/theme/system.tsindex 39e815151e..474bd38a50 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/system.ts@@ -101,6 +101,11 @@ const brandFg: Compute = (theme) =>? `color-mix(in oklab, ${theme.colors.brand.solid} 50%, ${theme.colors.neutral[950]})`: theme.colors.brand.solid;const accentSolid: Compute = (theme) => theme.colors.accent.solid;+/** Foreground pulled toward accent: the hue of interaction fills, which apply it at low alpha. */+const hoverTint: Compute = (theme) =>+ `color-mix(in oklab, ${theme.colors.accent.solid} 40%, ${+ theme.colorScheme === 'light' ? theme.colors.neutral[950] : theme.colors.neutral[50]+ })`;/** The neutral ramp, emitted as `neutral.50…neutral.950`, one value per theme. */const neutralRamp = Object.fromEntries(STEPS.map((step) => [step, colorToken((theme) => theme.colors.neutral[step])]));@@ -152,6 +157,8 @@ const semanticColors = {'bg.panel': stepRef(800, 100),'bg.emphasized': colorToken((theme) => theme.colors.control),'bg.inset': colorToken((theme) => theme.colors.inset),+ /** The pointed fill for rows and tabs: a faint accent-tinted foreground, translucent so it reads on any surface. */+ 'bg.hover': mix(hoverTint, 8, () => 'transparent'),// Soft status fills for alerts/banners, mixed into the panel surface.'bg.error': mix(danger, 14, surface),'bg.success': mix(success, 14, surface),@@ -198,12 +205,7 @@ const semanticColors = {600),/** Mix foreground toward accent for low-alpha interaction fills. */- hoverTint: grayToken(- (theme) =>- `color-mix(in oklab, ${theme.colors.accent.solid} 40%, ${- theme.colorScheme === 'light' ? theme.colors.neutral[950] : theme.colors.neutral[50]- })`- ),+ hoverTint: grayToken(hoverTint),},// Palette-tinted interaction fills for the non-default palettes buttons use.red: { hoverTint: { value: '{colors.red.fg}' } },