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(webv2): list Nodes before Fonts on the Launchpad
Josh Corbettc2854edf7bb8
diff --git a/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs b/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjsindex 36fca2ecba..6b6852a452 100644--- a/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs+++ b/invokeai/frontend/webv2/scripts/run-accessibility-journeys.mjs@@ -316,7 +316,7 @@ const runKeyboardJourney = async (browser) => {const rail = page.getByRole('navigation', { exact: true, name: 'Launchpad sections' });const projectsLink = rail.getByRole('link', { exact: true, name: 'Projects' });- const fontsLink = rail.getByRole('link', { exact: true, name: 'Fonts' });+ const nodesLink = rail.getByRole('link', { exact: true, name: 'Nodes' });const modelsLink = rail.getByRole('link', { exact: true, name: 'Models' });// The rail's links are in visual order, so Tab and reading order follow what it shows.@@ -335,10 +335,11 @@ const runKeyboardJourney = async (browser) => {assert.match(page.url(), /#\/models$/);assert.equal(await modelsLink.getAttribute('aria-current'), 'page');await modelsLink.press('Tab');- await expectFocused(fontsLink, 'Tab should move focus from Models to Fonts.');- await fontsLink.press('Enter');- await page.waitForURL(/#\/fonts$/);- assert.equal(await fontsLink.getAttribute('aria-current'), 'page');+ await expectFocused(nodesLink, 'Tab should move focus from Models to Nodes.');+ await nodesLink.press('Enter');+ await waitForNodes(page);+ assert.match(page.url(), /#\/nodes$/);+ assert.equal(await nodesLink.getAttribute('aria-current'), 'page');assert.equal(await modelsLink.getAttribute('aria-current'), null);const paletteTrigger = page.getByRole('button', { exact: true, name: 'Command palette' });diff --git a/invokeai/frontend/webv2/src/workbench/launchpad/Launchpad.tsx b/invokeai/frontend/webv2/src/workbench/launchpad/Launchpad.tsxindex a71b4843c5..7f4a4b63b9 100644--- a/invokeai/frontend/webv2/src/workbench/launchpad/Launchpad.tsx+++ b/invokeai/frontend/webv2/src/workbench/launchpad/Launchpad.tsx@@ -104,66 +104,64 @@ export const Launchpad = () => {[navigate]);- const filtered = useMemo<LaunchpadSection[]>(- () =>- (- [- {- group: 'workspace',- icon: HouseIcon,- id: 'home',- label: t('launchpad.sections.home'),- render: () => <HomePage />,- },- {- group: 'workspace',- icon: FolderIcon,- id: 'projects',- label: t('launchpad.sections.projects'),- render: () => <ProjectsPage />,- },- {- condition: canManageModels,- group: 'manage',- icon: BoxIcon,- id: 'models',- label: t('launchpad.sections.models'),- render: () => <ModelsPage />,- },- {- group: 'manage',- icon: TypeIcon,- id: 'fonts',- label: t('launchpad.sections.fonts'),- render: () => <FontsPage />,- },- {- condition: canManageNodes,- group: 'manage',- icon: BlocksIcon,- id: 'nodes',- label: t('launchpad.sections.nodes'),- render: () => <NodesPage />,- },- {- condition: canManageUsers,- group: 'manage',- icon: UsersIcon,- id: 'users',- label: t('launchpad.sections.users'),- render: () => <UsersPage onManageIntermediates={manageIntermediatesOf} />,- },- {- group: 'footer',- icon: SettingsIcon,- id: 'preferences',- label: t('launchpad.sections.preferences'),- render: () => <PreferencesPage />,- },- ] satisfies (LaunchpadSection & { condition?: boolean })[]- ).filter((section) => section.condition ?? true),- [canManageModels, canManageNodes, canManageUsers, manageIntermediatesOf, t]- );+ const filtered = useMemo<LaunchpadSection[]>(() => {+ const sections = [+ {+ group: 'workspace',+ icon: HouseIcon,+ id: 'home',+ label: t('launchpad.sections.home'),+ render: () => <HomePage />,+ },+ {+ group: 'workspace',+ icon: FolderIcon,+ id: 'projects',+ label: t('launchpad.sections.projects'),+ render: () => <ProjectsPage />,+ },+ {+ condition: canManageModels,+ group: 'manage',+ icon: BoxIcon,+ id: 'models',+ label: t('launchpad.sections.models'),+ render: () => <ModelsPage />,+ },+ {+ condition: canManageNodes,+ group: 'manage',+ icon: BlocksIcon,+ id: 'nodes',+ label: t('launchpad.sections.nodes'),+ render: () => <NodesPage />,+ },+ {+ group: 'manage',+ icon: TypeIcon,+ id: 'fonts',+ label: t('launchpad.sections.fonts'),+ render: () => <FontsPage />,+ },+ {+ condition: canManageUsers,+ group: 'manage',+ icon: UsersIcon,+ id: 'users',+ label: t('launchpad.sections.users'),+ render: () => <UsersPage onManageIntermediates={manageIntermediatesOf} />,+ },+ {+ group: 'footer',+ icon: SettingsIcon,+ id: 'preferences',+ label: t('launchpad.sections.preferences'),+ render: () => <PreferencesPage />,+ },+ ] satisfies (LaunchpadSection & { condition?: boolean })[];++ return sections.filter((section) => section.condition ?? true);+ }, [canManageModels, canManageNodes, canManageUsers, manageIntermediatesOf, t]);return (<ProjectActionsMenuProvider>diff --git a/invokeai/frontend/webv2/src/workbench/palette/LaunchpadCommandPaletteDialog.tsx b/invokeai/frontend/webv2/src/workbench/palette/LaunchpadCommandPaletteDialog.tsxindex 3bb92fc3f8..a5cbb0c8ee 100644--- a/invokeai/frontend/webv2/src/workbench/palette/LaunchpadCommandPaletteDialog.tsx+++ b/invokeai/frontend/webv2/src/workbench/palette/LaunchpadCommandPaletteDialog.tsx@@ -63,8 +63,8 @@ const LaunchpadCommandPaletteDialog = ({}),navEntry({ id: 'goToProjects', run: () => void navigate({ to: '/projects' }) }),...(canManageModels ? [navEntry({ id: 'goToModels', run: () => void navigate({ to: '/models' }) })] : []),- navEntry({ id: 'goToFonts', keywords: 'font typeface typography', run: () => void navigate({ to: '/fonts' }) }),...(canManageNodes ? [navEntry({ id: 'goToNodes', run: () => void navigate({ to: '/nodes' }) })] : []),+ navEntry({ id: 'goToFonts', keywords: 'font typeface typography', run: () => void navigate({ to: '/fonts' }) }),...(canManageUsers ? [navEntry({ id: 'goToUsers', run: () => void navigate({ to: '/users' }) })] : []),buildOpenSettingsEntry(t, () => void navigate({ to: '/preferences' })),];