Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: workflow builder #7608

Draft
wants to merge 58 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
92d25d3
feat(ui): add notes state to fields
psychedelicious Jan 17, 2025
b034791
feat(ui): add notes popover to field title bar
psychedelicious Jan 17, 2025
a842698
feat(ui): show notes icon on editor linear view
psychedelicious Jan 17, 2025
d969958
feat(ui): show notes icon on user-linear view, replacing info icon
psychedelicious Jan 17, 2025
9ffa1b8
feat(ui): clean up user-linear view styling
psychedelicious Jan 17, 2025
f1de722
feat(ui): add ViewContext so components can know where they are being…
psychedelicious Jan 17, 2025
861a237
perf(ui): use data attribute for input field wrapper styles
psychedelicious Jan 19, 2025
5ec173b
refactor(ui): workflows component structure (WIP)
psychedelicious Jan 20, 2025
a8b0c1c
refactor(ui): workflows left panel internal components structure
psychedelicious Jan 20, 2025
50461b1
fix(ui): remove accidental change to zFieldInput schema
psychedelicious Jan 20, 2025
1ba9b54
refactor(ui): continued reorg of components & hooks
psychedelicious Jan 20, 2025
e967794
refactor(ui): continued reorg of components & hooks
psychedelicious Jan 20, 2025
2957021
fix(ui): color field component layout
psychedelicious Jan 20, 2025
b61e07c
feat(ui): get configurable notes display working
psychedelicious Jan 20, 2025
254d9b5
feat(ui): use workflows view context
psychedelicious Jan 20, 2025
914ef1f
fix(ui): dynamic prompts infinite recursion (wip)
psychedelicious Jan 20, 2025
79af1e1
feat(ui): rough out workflow builder data structure & dummy data
psychedelicious Jan 21, 2025
e9cb3f6
refactor(ui): split up float and integer field renderers
psychedelicious Jan 21, 2025
0dddf4f
revert(ui): rip out linear view config stuff
psychedelicious Jan 22, 2025
1665f13
refactor(ui): split integer, float and string field components in pre…
psychedelicious Jan 22, 2025
1a7e134
feat(ui): rough out workflow builder data structure
psychedelicious Jan 22, 2025
53fb250
chore(ui): lint
psychedelicious Jan 22, 2025
f051b0b
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
dfc1d67
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
a366a32
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
1428189
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
4485450
feat(ui): getPrefixedId supports custom separator
psychedelicious Jan 22, 2025
9cabb88
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
819346b
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
578d1bb
feat(ui): iterate on builder (WIP)
psychedelicious Jan 22, 2025
3329f12
feat(ui): iterate on builder (WIP)
psychedelicious Jan 23, 2025
81cdaac
feat(ui): hacking on dnd (WIP)
psychedelicious Jan 23, 2025
5b6c035
feat(ui): dim form element while dragging
psychedelicious Jan 23, 2025
71407cf
feat(ui): dnd mostly working (WIP)
psychedelicious Jan 24, 2025
e966bf9
feat(ui): dnd almost fully working (WIP)
psychedelicious Jan 24, 2025
db0eeaf
feat(ui): improved dnd hitbox for edges when center drop is allowed
psychedelicious Jan 24, 2025
c957916
feat(ui): dnd drop target styling
psychedelicious Jan 24, 2025
0e66e53
fix(ui): do not allow reparenting to self
psychedelicious Jan 24, 2025
82a6fcb
feat(ui): improved drop target styling
psychedelicious Jan 24, 2025
265cf8c
feat(ui): support adding form elements and node fields with dnd
psychedelicious Jan 25, 2025
d58ed05
fix(ui): allow root element to be drop target
psychedelicious Jan 25, 2025
d3b4294
fix(ui): start workflow w/ single column as root
psychedelicious Jan 25, 2025
7c7d892
fix(ui): use redux store for form
psychedelicious Jan 25, 2025
99b57ac
tidy(ui): remove unused mock form builder data
psychedelicious Jan 25, 2025
98cdbed
fix(ui): hide nonfunctional delete button on root form element
psychedelicious Jan 25, 2025
d51529b
chore(ui): upgrade reactflow to v12
psychedelicious Jan 25, 2025
4ef198f
refactor(ui): edge rendering
psychedelicious Jan 25, 2025
33bde00
tweak(ui): node selection colors
psychedelicious Jan 25, 2025
ac83141
fix(ui): do not render dashed edges unless animation is enabled
psychedelicious Jan 25, 2025
9586b44
fix(ui): node-autoconnect showing invalid connection options
psychedelicious Jan 26, 2025
9edd189
chore(ui): lint
psychedelicious Jan 26, 2025
0205440
chore(ui): lint
psychedelicious Jan 26, 2025
4ecf8be
perf(ui): faster InputFieldRenderer
psychedelicious Jan 26, 2025
d49ad17
fix(ui): circular dep
psychedelicious Jan 26, 2025
6413753
tidy(ui): import reactflow css in main theme provider
psychedelicious Jan 26, 2025
468f1bf
feat(ui): plumbing for editable form elements
psychedelicious Jan 30, 2025
32327be
chore(ui): bump @invoke-ai/ui-library
psychedelicious Jan 31, 2025
3e0a569
feat(ui): editable heading and text elements
psychedelicious Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions invokeai/frontend/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
"@dagrejs/dagre": "^1.1.4",
"@dagrejs/graphlib": "^2.2.4",
"@fontsource-variable/inter": "^5.1.0",
"@invoke-ai/ui-library": "^0.0.44",
"@invoke-ai/ui-library": "^0.0.46",
"@nanostores/react": "^0.7.3",
"@reduxjs/toolkit": "2.2.3",
"@roarr/browser-log-writer": "^1.3.0",
"@xyflow/react": "^12.4.2",
"async-mutex": "^0.5.0",
"chakra-react-select": "^4.9.2",
"cmdk": "^1.0.0",
Expand Down Expand Up @@ -96,9 +97,9 @@
"react-icons": "^5.3.0",
"react-redux": "9.1.2",
"react-resizable-panels": "^2.1.4",
"react-textarea-autosize": "^8.5.7",
"react-use": "^17.5.1",
"react-virtuoso": "^4.10.4",
"reactflow": "^11.11.4",
"redux-dynamic-middlewares": "^2.2.0",
"redux-remember": "^5.1.0",
"redux-undo": "^1.1.0",
Expand Down
590 changes: 267 additions & 323 deletions invokeai/frontend/web/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '@fontsource-variable/inter';
import 'overlayscrollbars/overlayscrollbars.css';
import '@xyflow/react/dist/base.css';

import { ChakraProvider, DarkMode, extendTheme, theme as _theme, TOAST_OPTIONS } from '@invoke-ai/ui-library';
import type { ReactNode } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { logger } from 'app/logging/logger';
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
import { $nodeExecutionStates } from 'features/nodes/hooks/useExecutionState';
import { $nodeExecutionStates } from 'features/nodes/hooks/useNodeExecutionState';
import { workflowLoaded, workflowLoadRequested } from 'features/nodes/store/actions';
import { $templates } from 'features/nodes/store/nodesSlice';
import { $needsFit } from 'features/nodes/store/reactFlowInstance';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { As, ChakraProps, FlexProps } from '@invoke-ai/ui-library';
import type { ChakraProps, FlexProps } from '@invoke-ai/ui-library';
import { Flex, Icon, Skeleton, Spinner, Text } from '@invoke-ai/ui-library';
import type { ElementType } from 'react';
import { memo, useMemo } from 'react';
import { PiImageBold } from 'react-icons/pi';
import type { ImageDTO } from 'services/api/types';
Expand Down Expand Up @@ -28,7 +29,7 @@ IAILoadingImageFallback.displayName = 'IAILoadingImageFallback';

type IAINoImageFallbackProps = FlexProps & {
label?: string;
icon?: As | null;
icon?: ElementType | null;
boxSize?: ChakraProps['boxSize'];
};

Expand Down

This file was deleted.

238 changes: 0 additions & 238 deletions invokeai/frontend/web/src/common/hooks/useChakraThemeTokens.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,10 @@ export function loadImage(src: string): Promise<HTMLImageElement> {
export const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 10);

export function getPrefixedId(
prefix: CanvasEntityIdentifier['type'] | CanvasObjectState['type'] | (string & Record<never, never>)
prefix: CanvasEntityIdentifier['type'] | CanvasObjectState['type'] | (string & Record<never, never>),
separator = ':'
): string {
return `${prefix}:${nanoid()}`;
return `${prefix}${separator}${nanoid()}`;
}

export const getEmptyRect = (): Rect => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type { DndListTargetState } from 'features/dnd/types';
*/
const line = {
thickness: 2,
backgroundColor: 'base.500',
backgroundColor: 'red',
// backgroundColor: 'base.500',
};

type DropIndicatorProps = {
Expand Down Expand Up @@ -104,7 +105,7 @@ function DndDropIndicatorInternal({ edge, gap = '0px' }: DropIndicatorProps) {
);
}

export const DndListDropIndicator = ({ dndState }: { dndState: DndListTargetState }) => {
export const DndListDropIndicator = ({ dndState, gap }: { dndState: DndListTargetState; gap?: string }) => {
if (dndState.type !== 'is-dragging-over') {
return null;
}
Expand All @@ -117,7 +118,7 @@ export const DndListDropIndicator = ({ dndState }: { dndState: DndListTargetStat
<DndDropIndicatorInternal
edge={dndState.closestEdge}
// This is the gap between items in the list, used to calculate the position of the drop indicator
gap="var(--invoke-space-2)"
gap={gap || 'var(--invoke-space-2)'}
/>
);
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'reactflow/dist/style.css';

import { Flex } from '@invoke-ai/ui-library';
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
import { useFocusRegion } from 'common/hooks/focus';
Expand Down
Loading
Loading