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(webv2): stop tab text scaling below the lg size

joshistoast51dd2d87ea61
diff --git a/invokeai/frontend/webv2/src/features/models/ui/manager/DetailPane.tsx b/invokeai/frontend/webv2/src/features/models/ui/manager/DetailPane.tsx
index e823193555..a0cb0ea1c4 100644
--- a/invokeai/frontend/webv2/src/features/models/ui/manager/DetailPane.tsx
+++ b/invokeai/frontend/webv2/src/features/models/ui/manager/DetailPane.tsx
@@ -38,17 +38,17 @@ export const DetailPane = () => {
>
<Flex align="flex-end" borderBottomWidth={1} flexShrink={0} minH={HEADER_MIN_HEIGHT} px="2">
<Tabs.List mb="-1px">
- <Tabs.Trigger fontSize="xs" value="details">
+ <Tabs.Trigger value="details">
<Icon as={BoxIcon} boxSize="3" />
<Text maxW="14rem" truncate>
{detailLabel}
</Text>
</Tabs.Trigger>
- <Tabs.Trigger fontSize="xs" value="add">
+ <Tabs.Trigger value="add">
<Icon as={PlusIcon} boxSize="3" />
{t('models.addModels')}
</Tabs.Trigger>
- <Tabs.Trigger fontSize="xs" value="keys">
+ <Tabs.Trigger value="keys">
<Icon as={KeyRoundIcon} boxSize="3" />
{t('models.apiKeys')}
</Tabs.Trigger>
diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/add-nodes/AddNodesView.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/add-nodes/AddNodesView.tsx
index 3107077978..758a097209 100644
--- a/invokeai/frontend/webv2/src/features/nodes/ui/add-nodes/AddNodesView.tsx
+++ b/invokeai/frontend/webv2/src/features/nodes/ui/add-nodes/AddNodesView.tsx
@@ -32,11 +32,11 @@ export const AddNodesView = () => {
<Tabs.Root asChild lazyMount size="sm" unmountOnExit value={addTab} onValueChange={handleValueChange}>
<Stack gap="3" h="full" minH="0">
<Tabs.List>
- <Tabs.Trigger fontSize="xs" value="git">
+ <Tabs.Trigger value="git">
<Icon as={GitBranchIcon} boxSize="3" />
{t('nodes.gitUrl')}
</Tabs.Trigger>
- <Tabs.Trigger fontSize="xs" value="scan">
+ <Tabs.Trigger value="scan">
<Icon as={FolderOpenIcon} boxSize="3" />
{t('nodes.scanFolder')}
</Tabs.Trigger>
diff --git a/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx b/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx
index 3fd3ad65f0..bdfb278c44 100644
--- a/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx
+++ b/invokeai/frontend/webv2/src/features/nodes/ui/manager/DetailPane.tsx
@@ -32,13 +32,13 @@ export const DetailPane = () => {
<Flex direction="column" flex="1" minH="0" minW="0">
<Flex align="flex-end" borderBottomWidth={1} flexShrink={0} minH={HEADER_MIN_HEIGHT} px="2">
<Tabs.List mb="-1px">
- <Tabs.Trigger fontSize="xs" value="details">
+ <Tabs.Trigger value="details">
<Icon as={BlocksIcon} boxSize="3" />
<Text maxW="14rem" truncate>
{detailLabel}
</Text>
</Tabs.Trigger>
- <Tabs.Trigger fontSize="xs" value="add">
+ <Tabs.Trigger value="add">
<Icon as={PlusIcon} boxSize="3" />
{t('nodes.addNodes')}
</Tabs.Trigger>
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx
index 8d367ac76e..7559ad3b0f 100644
--- a/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx
+++ b/invokeai/frontend/webv2/src/features/workflow/ui/library/WorkflowLibraryDialog.tsx
@@ -368,12 +368,8 @@ export const WorkflowLibraryDialog = ({
onValueChange={(event) => setCategory(event.value as WorkflowLibraryCategory)}
>
<Tabs.List>
- <Tabs.Trigger fontSize="xs" value="user">
- Yours
- </Tabs.Trigger>
- <Tabs.Trigger fontSize="xs" value="default">
- Defaults
- </Tabs.Trigger>
+ <Tabs.Trigger value="user">Yours</Tabs.Trigger>
+ <Tabs.Trigger value="default">Defaults</Tabs.Trigger>
</Tabs.List>
</Tabs.Root>
<Input
diff --git a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
index 66b1df0204..bbdc3ca5ae 100644
--- a/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
+++ b/invokeai/frontend/webv2/src/platform/ui/theme/recipes.ts
@@ -54,6 +54,10 @@ export const tooltipSlotRecipe = defineSlotRecipe({
* Tabs: quick neutral hover feedback, with accent reserved for selection.
* Restricting hover styles to unselected triggers keeps active tabs visually
* stable without relying on condition ordering in the generated CSS.
+ *
+ * Trigger text follows the same rule as {@link buttonRecipe}: the label stops
+ * scaling below `lg`, so `sm` and `md` both sit at 12px with the rest of the
+ * workbench chrome. Only the row height still scales with the size.
*/
export const tabsSlotRecipe = defineSlotRecipe({
...chakraSlotRecipes.tabs,
@@ -67,6 +71,17 @@ export const tabsSlotRecipe = defineSlotRecipe({
},
variants: {
...chakraSlotRecipes.tabs.variants,
+ size: {
+ ...chakraSlotRecipes.tabs.variants?.size,
+ sm: {
+ ...chakraSlotRecipes.tabs.variants?.size?.sm,
+ trigger: { ...chakraSlotRecipes.tabs.variants?.size?.sm?.trigger, textStyle: 'xs' },
+ },
+ md: {
+ ...chakraSlotRecipes.tabs.variants?.size?.md,
+ trigger: { ...chakraSlotRecipes.tabs.variants?.size?.md?.trigger, textStyle: 'xs' },
+ },
+ },
variant: {
...chakraSlotRecipes.tabs.variants?.variant,
line: {
@@ -118,7 +133,7 @@ export const tabsSlotRecipe = defineSlotRecipe({
},
},
},
- } as typeof chakraSlotRecipes.tabs.variants,
+ } as unknown as typeof chakraSlotRecipes.tabs.variants,
});
/**