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(topbar): flatten the preset icon picker into one grid
Josh Corbettc2664b02ed2e
diff --git a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetDialog.tsx b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetDialog.tsxindex 6d309c7852..caf61de31f 100644--- a/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetDialog.tsx+++ b/invokeai/frontend/webv2/src/workbench/shell/topbar/LayoutPresetDialog.tsx@@ -31,7 +31,8 @@ import { getInitialLayoutPresetIconId, getInitialLayoutPresetRoute } from './layimport { layoutPresetIconGroups } from './layoutPresetIcons';import { RoutingDestinationSegments } from './RoutingDestinationSegments';-const layoutPresetIconIds = layoutPresetIconGroups.flatMap((group) => group.options.map((option) => option.id));+const layoutPresetIconOptions = layoutPresetIconGroups.flatMap((group) => group.options);+const layoutPresetIconIds = layoutPresetIconOptions.map((option) => option.id);type SourceSelectItem = GraphWidgetSource & { value: InvocationSourceId };@@ -208,25 +209,18 @@ export const LayoutPresetDialog = ({<Text color="fg.subtle" fontSize="2xs" fontWeight="700" textTransform="uppercase">{t('topbar.presets.icon')}</Text>- {layoutPresetIconGroups.map((group) => (- <Stack key={group.label} gap="1.5">- <Text color="fg.muted" fontSize="2xs">- {group.label}- </Text>- <SimpleGrid columns={8} gap="1">- {group.options.map((entry) => (- <IconOption- key={entry.id}- icon={entry.icon}- iconId={entry.id}- isSelected={entry.id === iconId}- label={entry.label}- onSelect={setIconId}- />- ))}- </SimpleGrid>- </Stack>- ))}+ <SimpleGrid columns={8} gap="1">+ {layoutPresetIconOptions.map((entry) => (+ <IconOption+ key={entry.id}+ icon={entry.icon}+ iconId={entry.id}+ isSelected={entry.id === iconId}+ label={entry.label}+ onSelect={setIconId}+ />+ ))}+ </SimpleGrid></Stack><FieldhelpText={sourceOptions.length === 0 ? t('topbar.presets.noInvocationSource') : undefined}