Skip to content

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.

fix(theme): hover plain buttons with the alpha fill, not an underline

Josh Corbettacd0cef5c7e0
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.browser.test.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.browser.test.tsx
index f82a850a08..59a245e5ff 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.browser.test.tsx
@@ -91,8 +91,11 @@ describe('PromptTriggerPopover', () => {
const messageBounds = message.getBoundingClientRect();
const actionBounds = action.getBoundingClientRect();
+ // The action pads its hover pill and pulls itself left by the same amount,
+ // so its TEXT is what lines up with the copy, not its box edge.
+ const actionTextLeft = actionBounds.left + Number.parseFloat(getComputedStyle(action).paddingLeft);
- expect(Math.abs(messageBounds.left - actionBounds.left)).toBeLessThanOrEqual(1);
+ expect(Math.abs(messageBounds.left - actionTextLeft)).toBeLessThanOrEqual(1);
expect(actionBounds.top - messageBounds.bottom).toBeLessThanOrEqual(8);
});
});
diff --git a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.tsx b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.tsx
index de9ae18fde..bb12838fec 100644
--- a/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.tsx
+++ b/invokeai/frontend/webv2/src/features/generation/ui/promptFields/PositivePromptActions.tsx
@@ -59,7 +59,7 @@ const OpenModelManagerButton = ({ modelType }: { modelType?: string }) => {
);
return (
- <Button alignSelf="start" px="0" size="xs" variant="plain" onClick={handleClick}>
+ <Button alignSelf="start" ms="-1.5" px="1.5" size="xs" variant="plain" onClick={handleClick}>
{t('widgets.generate.openModelManager')}
</Button>
);
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewSidePanel.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewSidePanel.tsx
index ac62bdfdf9..89b5ee7f94 100644
--- a/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewSidePanel.tsx
+++ b/invokeai/frontend/webv2/src/features/workflow/ui/graph-preview/GraphPreviewSidePanel.tsx
@@ -77,7 +77,8 @@ const SummaryNotice = ({
fontSize="2xs"
fontWeight="normal"
h="auto"
- px="0"
+ ms="-1"
+ px="1"
size="2xs"
variant="plain"
onClick={handleShowNode}
@@ -253,7 +254,8 @@ const NodeInspector = ({
fontSize="2xs"
fontWeight="normal"
h="auto"
- px="0"
+ ms="-1"
+ px="1"
size="2xs"
variant="plain"
onClick={onProvenanceClick}
diff --git a/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx b/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
index 82af2d5319..d46a593cbd 100644
--- a/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
+++ b/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
@@ -40,7 +40,16 @@ const HintCard = ({ hint, onDisable }: { hint: FeatureHintId; onDisable: (() =>
<Separator />
<HStack gap="2" minH="4">
{onDisable && (
- <Button color="fg.subtle" fontSize="2xs" h="auto" px="0" size="2xs" variant="plain" onClick={onDisable}>
+ <Button
+ color="fg.subtle"
+ fontSize="2xs"
+ h="auto"
+ ms="-1"
+ px="1"
+ size="2xs"
+ variant="plain"
+ onClick={onDisable}
+ >
{t('common.dontShowMeThese')}
</Button>
)}
diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
index 5f40878165..b56f25430c 100644
--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
@@ -198,11 +198,11 @@ export const buttonRecipe = defineRecipe({
_hover: { bg: 'colorPalette.fg/10' },
_expanded: { bg: 'colorPalette.fg/10' },
},
- // Plain buttons are link-shaped actions; stock Chakra gives them no
- // hover state at all.
+ // Stock Chakra gives plain buttons no hover state at all; they take the
+ // same surface-proof fill as ghost.
plain: {
...chakraRecipes.button.variants?.variant?.plain,
- _hover: { textDecoration: 'underline' },
+ _hover: { bg: 'colorPalette.fg/10' },
},
},
} as unknown as typeof chakraRecipes.button.variants,