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): align link-button hover pills with adjacent copy

Josh Corbettd3ee45d2e469
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 59a245e5ff..b3e293b184 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,11 +91,10 @@ 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 - actionTextLeft)).toBeLessThanOrEqual(1);
+ // The hover pill's edge is what reads as the button's edge, so the box —
+ // not the padded text — lines up with the copy.
+ expect(Math.abs(messageBounds.left - actionBounds.left)).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 bb12838fec..474308e7bc 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" ms="-1.5" px="1.5" size="xs" variant="plain" onClick={handleClick}>
+ <Button alignSelf="start" 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 89b5ee7f94..7477bf580b 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,6 @@ const SummaryNotice = ({
fontSize="2xs"
fontWeight="normal"
h="auto"
- ms="-1"
px="1"
size="2xs"
variant="plain"
@@ -254,7 +253,6 @@ const NodeInspector = ({
fontSize="2xs"
fontWeight="normal"
h="auto"
- ms="-1"
px="1"
size="2xs"
variant="plain"
diff --git a/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx b/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
index d46a593cbd..16b9ec7537 100644
--- a/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
+++ b/invokeai/frontend/webv2/src/platform/ui/hints/FeatureHint.tsx
@@ -40,16 +40,7 @@ const HintCard = ({ hint, onDisable }: { hint: FeatureHintId; onDisable: (() =>
<Separator />
<HStack gap="2" minH="4">
{onDisable && (
- <Button
- color="fg.subtle"
- fontSize="2xs"
- h="auto"
- ms="-1"
- px="1"
- size="2xs"
- variant="plain"
- onClick={onDisable}
- >
+ <Button color="fg.subtle" fontSize="2xs" h="auto" px="1" size="2xs" variant="plain" onClick={onDisable}>
{t('common.dontShowMeThese')}
</Button>
)}