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): sweep a subtle shine across skeletons instead of pulsing
Josh Corbettc0863666607f
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryCard.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryCard.tsxindex dda31c9bc4..3a1e43f7c5 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryCard.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryCard.tsx@@ -99,7 +99,7 @@ export const WorkflowLibraryCard = ({{enrichment.status === 'pending' ? (// Enrichment in flight. An unreadable workflow ('error') gets no// placeholder and no error styling — the facts simply stay absent.- <Skeleton data-enrichment-placeholder h="3" rounded="sm" variant="pulse" w="14" />+ <Skeleton data-enrichment-placeholder h="3" rounded="sm" w="14" />) : null}{primaryBase ? (<Badge flexShrink={0} size="xs" variant="subtle">diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowRequirementsList.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowRequirementsList.tsxindex c668963b0b..a8682a43f7 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowRequirementsList.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowRequirementsList.tsx@@ -238,7 +238,7 @@ export const WorkflowRequirementsList = ({ errorMessage, resolved, onFindModel }) : null}{!errorMessage && resolved === null? Array.from({ length: SKELETON_ROW_COUNT }, (_unused, index) => (- <Skeleton key={index} data-requirement-placeholder h="3" rounded="sm" variant="pulse" w="24" />+ <Skeleton key={index} data-requirement-placeholder h="3" rounded="sm" w="24" />)): null}{!errorMessage && resolved !== null && resolved.length > 0 ? (diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.tsindex 3dad6fe3fe..697441c281 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts@@ -654,6 +654,32 @@ export const colorPickerSlotRecipe = defineSlotRecipe({},});+/**+ * Skeletons sweep a subtle highlight instead of pulsing. The gradient rests on+ * the same `bg.emphasized` surface the stock pulse used; the band is a small+ * fg lift so it stays quiet on every theme. Reduce-motion is handled by the+ * global `.chakra-skeleton` animation kill in `system.ts`.+ */+export const skeletonRecipe = defineRecipe({+ ...chakraRecipes.skeleton,+ variants: {+ ...chakraRecipes.skeleton.variants,+ variant: {+ ...chakraRecipes.skeleton.variants?.variant,+ shine: {+ ...chakraRecipes.skeleton.variants?.variant?.shine,+ '--duration': '2s',+ '--end-color': 'colors.bg.emphasized',+ '--start-color': 'color-mix(in oklab, {colors.fg} 8%, {colors.bg.emphasized})',+ },+ },+ } as unknown as typeof chakraRecipes.skeleton.variants,+ defaultVariants: {+ ...chakraRecipes.skeleton.defaultVariants,+ variant: 'shine',+ },+});+export const panelRecipe = defineRecipe({base: {bg: 'bg.subtle',diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts b/invokeai/frontend/webv2/src/platform/ui/theme/system.tsindex 71ab672a5f..ac8872d78e 100644--- a/invokeai/frontend/webv2/src/platform/ui/theme/system.ts+++ b/invokeai/frontend/webv2/src/platform/ui/theme/system.ts@@ -13,6 +13,7 @@ import {progressCircleSlotRecipe,segmentGroupSlotRecipe,selectSlotRecipe,+ skeletonRecipe,sliderSlotRecipe,tabsSlotRecipe,textareaRecipe,@@ -262,8 +263,11 @@ const config = defineConfig({'--wb-motion-animation-iteration-count': '1',scrollBehavior: 'auto !important',},+ // `backgroundImage` too: the shine gradient frozen mid-sweep reads as a+ // smudge, so reduce-motion falls back to the flat fill.':root[data-reduce-motion="true"] .chakra-skeleton': {animation: 'none !important',+ backgroundImage: 'none !important',},// A loading spinner is essential status, not decoration — frozen, its arc// reads as a broken icon. It slows to a crawl instead of stopping; WCAG@@ -314,6 +318,7 @@ const config = defineConfig({recipes: {button: buttonRecipe,input: inputRecipe,+ skeleton: skeletonRecipe,textarea: textareaRecipe,},slotRecipes: {