Commit Graph

8418 Commits

Author SHA1 Message Date
psychedelicious
fe59d7f3b0 fix(ui): opacity reset value incorrect 2024-08-30 22:20:36 +10:00
psychedelicious
b2b2b73aed revert(ui): roll back flip, doesn't work with rotate yet 2024-08-30 22:20:36 +10:00
psychedelicious
20b563c4cb fix(ui): disable opacity slider fully when no valid entity selected 2024-08-30 22:20:36 +10:00
psychedelicious
263a0ef5b4 fix(ui): layer preview image sometimes not rendering
The canvas size was dynamic based on the container div's size. When the div was hidden (e.g. when selecting another tab), the container's effective size is 0. This resulted in the preview image canvas being drawn at a scale of 0.

Fixed by using an absolute size for the canvas container.
2024-08-30 22:20:36 +10:00
psychedelicious
e8723b7cd3 feat(ui): tweak regional prompt box styles 2024-08-30 22:20:36 +10:00
psychedelicious
03e05b2068 feat(ui): tweak enabled/locked toggle styles 2024-08-30 22:20:36 +10:00
psychedelicious
6c0482a71d feat(ui): tweak filter styling 2024-08-30 22:20:36 +10:00
psychedelicious
e6153e6fa4 feat(ui): add flip & reset to transform 2024-08-30 22:20:36 +10:00
psychedelicious
6d209c6cc3 tidy(ui): use helper to sync scaled bbox size on model change 2024-08-30 22:20:36 +10:00
psychedelicious
beb4e823dc fix(ui): randomize seed toggle linked to prompt concat 2024-08-30 22:20:36 +10:00
psychedelicious
61ba4c606b chore: release v4.2.9.dev5 2024-08-30 22:20:36 +10:00
psychedelicious
af840cedf3 chore(ui): lint 2024-08-30 22:20:36 +10:00
psychedelicious
0bf0bca03f feat(ui): generalize mask fill, add to action bar 2024-08-30 22:20:36 +10:00
psychedelicious
e470eaf8f3 feat(ui): implement interaction locking on layers 2024-08-30 22:20:36 +10:00
psychedelicious
377db3f726 feat(ui): iterate on layer actions
- Add lock toggle
- Tweak lock and enabled styles
- Update entity list action bar w/ delete & delete all
- Move add layer menu to action bar
- Adjust opacity slider style
2024-08-30 22:20:36 +10:00
psychedelicious
77f020a997 feat(ui): collapsible entity groups 2024-08-30 22:20:36 +10:00
psychedelicious
34e2eda625 tidy(ui): rename some classes to be consistent 2024-08-30 22:20:36 +10:00
psychedelicious
e1d559db69 feat(ui): tuned canvas undo/redo
- Throttle pushing to history for actions of the same type, starting with 1000ms throttle.
- History has a limit of 64 items, same as workflow editor
- Add clear history button
- Fix an issue where entity transformers would reset the entity state when the entity is fully transparent, resetting the redo stack. This could happen when you undo to the starting state of a layer
2024-08-30 22:20:36 +10:00
psychedelicious
23a98e2ed6 tidy(ui): move all undoable reducers back to canvas slice 2024-08-30 22:20:36 +10:00
psychedelicious
fe3b2ed357 fix(ui): dnd image count 2024-08-30 22:20:36 +10:00
psychedelicious
eedf81dcc5 fix(ui): canvas entity opacity scale 2024-08-30 22:20:36 +10:00
psychedelicious
dbef1a9e06 perf(ui): optimize all selectors 2
Mostly selector optimization. Still a few places to tidy up but I'll get to that later.
2024-08-30 22:20:36 +10:00
psychedelicious
a41406ca9a perf(ui): optimize all selectors 1
I learned that the inline selector syntax recreates the selector function on every render:

```ts
const val = useAppSelector((s) => s.slice.val)
```

Not good! Better is to create a selector outside the function and use it. Doing that for all selectors now, most of the way through now. Feels snappier.
2024-08-30 22:20:12 +10:00
psychedelicious
f126a61f66 feat(ui): rough out undo/redo on canvas 2024-08-30 22:20:12 +10:00
psychedelicious
89c79276f3 chore: release v4.2.9.dev4
Canvas dev build.
2024-08-30 22:20:12 +10:00
psychedelicious
423e463b95 fix(ui): handle error from internal konva method
We are dipping into konva's private API for preview images and it appears to be unsafe (got an error once). Wrapped in a try/catch.
2024-08-30 22:20:12 +10:00
psychedelicious
52202e45de feat(ui): split out loras state from canvas rendering state 2024-08-30 22:20:12 +10:00
psychedelicious
100832c66d feat(ui): split out session state from canvas rendering state 2024-08-30 22:20:12 +10:00
psychedelicious
a58b91b221 feat(ui): split out settings state from canvas rendering state 2024-08-30 22:20:12 +10:00
psychedelicious
3af6d79852 feat(ui): split out tool state from canvas rendering state 2024-08-30 22:20:12 +10:00
psychedelicious
1303e18e93 feat(ui): split out params/compositing state from canvas rendering state
First step to restoring undo/redo - the undoable state must be in its own slice. So params and settings must be isolated.
2024-08-30 22:20:12 +10:00
psychedelicious
301da97670 feat(ui): add CanvasModuleBase class to standardize canvas APIs
I did this ages ago but undid it for some reason, not sure why. Caught a few issues related to subscriptions.
2024-08-30 22:20:12 +10:00
psychedelicious
17e76981bb feat(ui): move selected tool and tool buffer out of redux
This ephemeral state can live in the canvas classes.
2024-08-30 22:20:12 +10:00
psychedelicious
9c1732e2bb feat(ui): move ephemeral state into canvas classes
Things like `$lastCursorPos` are now created within the canvas drawing classes. Consumers in react access them via `useCanvasManager`.

For example:
```tsx
const canvasManager = useCanvasManager();
const lastCursorPos = useStore(canvasManager.stateApi.$lastCursorPos);
```
2024-08-30 22:20:12 +10:00
psychedelicious
a3179e7a3f feat(ui): normalize all actions to accept an entityIdentifier
Previously, canvas actions specific to an entity type only needed the id of that entity type. This allowed you to pass in the id of an entity of the wrong type.

All actions for a specific entity now take a full entity identifier, and the entity identifier type can be narrowed.

`selectEntity` and `selectEntityOrThrow` now need a full entity identifier, and narrow their return values to a specific entity type _if_ the entity identifier is narrowed.

The types for canvas entities are updated with optional type parameters for this purpose.

All reducers, actions and components have been updated.
2024-08-30 22:20:12 +10:00
psychedelicious
f86b50d18a feat(ui): move events into modules who care about them 2024-08-30 22:20:12 +10:00
psychedelicious
307885f505 fix(ui): color picker resets brush opacity 2024-08-30 22:20:12 +10:00
psychedelicious
4b49c1dd6b fix(ui): scaled bbox loses sync 2024-08-30 22:20:12 +10:00
psychedelicious
f917cefa84 feat(ui): add context menu to entity list 2024-08-30 22:20:12 +10:00
psychedelicious
bea98438fc chore(ui): bump @invoke-ai/ui-library 2024-08-30 22:20:12 +10:00
psychedelicious
17d3275086 fix(ui): missing vae precision in graph builders 2024-08-30 22:20:12 +10:00
psychedelicious
059b7a0fcf chore: release v4.2.9.dev3
Instead of using dates, just going to increment.
2024-08-30 22:20:12 +10:00
psychedelicious
05d3a989f6 feat(ui): use new Result utils for enqueueing 2024-08-30 22:20:12 +10:00
psychedelicious
590ae70c12 fix(ui): graph building issue w/ controlnet 2024-08-30 22:20:12 +10:00
psychedelicious
5240ec6e6f feat(ui): add Result type & helpers
Wrappers to capture errors and turn into results:
- `withResult` wraps a sync function
- `withResultAsync` wraps an async function

Comments, tests.
2024-08-30 22:20:12 +10:00
psychedelicious
04772b642c chore: release v4.2.9.dev20240824 2024-08-30 22:20:12 +10:00
psychedelicious
65f6cb416f fix(ui): lint & fix issues with adding regional ip adapters 2024-08-30 22:20:12 +10:00
psychedelicious
24c2028739 feat(ui): add knipignore tag
I'm not ready to delete some things but still want to build the app.
2024-08-30 22:20:12 +10:00
psychedelicious
b0db9a3f56 feat(ui): duplicate entity 2024-08-30 22:20:12 +10:00
psychedelicious
3ea83574c0 feat(ui): autocomplete on getPrefixeId 2024-08-30 22:20:12 +10:00
psychedelicious
05252a9bfc feat(ui): paste canvas gens back on source in generate mode 2024-08-30 22:20:12 +10:00
psychedelicious
ce854f086e chore(ui): typegen 2024-08-30 22:20:12 +10:00
psychedelicious
ff0c16978c feat(nodes): CanvasV2MaskAndCropInvocation can paste generated image back on source
This is needed for `Generate` mode.
2024-08-30 22:20:12 +10:00
psychedelicious
41cc650031 fix(ui): extraneous entity preview updates 2024-08-30 22:20:12 +10:00
psychedelicious
c3f7554053 fix(ui): newly-added entities are selected 2024-08-30 22:20:12 +10:00
psychedelicious
3f597a1c60 feat(ui): add crosshair to color picker 2024-08-30 22:20:12 +10:00
psychedelicious
ccffdf1878 fix(ui): color picker ignores alpha 2024-08-30 22:20:12 +10:00
psychedelicious
474089e892 fix(ui): calculate renderable entities correctly in tool module 2024-08-30 22:20:12 +10:00
psychedelicious
778e8ad161 feat(ui): better color picker 2024-08-30 22:20:12 +10:00
psychedelicious
9f29892c24 feat(ui): colored mask preview image 2024-08-30 22:20:12 +10:00
psychedelicious
56fd46a069 fix(ui): new rectangles don't trigger rerender 2024-08-30 22:20:12 +10:00
psychedelicious
579e594861 chore: bump version v4.2.9.dev20240823 2024-08-30 22:20:12 +10:00
psychedelicious
af3440fbe3 feat(ui): disable most interaction while filtering 2024-08-30 22:19:54 +10:00
psychedelicious
cc101f55c4 fix(ui): filter preview offset 2024-08-30 22:19:54 +10:00
psychedelicious
ef1adf07f5 feat(ui): tweak layout of staging area toolbar 2024-08-30 22:19:54 +10:00
psychedelicious
625c05d9be chore(ui): typegen 2024-08-30 22:19:54 +10:00
psychedelicious
8ad3d8f738 tidy(app): clean up app changes for canvas v2 2024-08-30 22:19:54 +10:00
psychedelicious
4759875733 feat(ui): use singleton for clear q confirm dialog 2024-08-30 22:19:54 +10:00
psychedelicious
768e6a3c55 fix(ui): rip out broken recall logic, NO TS ERRORS 2024-08-30 22:19:54 +10:00
psychedelicious
45bd85c039 chore(ui): lint 2024-08-30 22:19:54 +10:00
psychedelicious
9f94c5a8bd fix(ui): staging area interaction scopes 2024-08-30 22:19:54 +10:00
psychedelicious
23fdd65961 fix(ui): staging area actions 2024-08-30 22:19:54 +10:00
psychedelicious
8034195c30 tidy(ui): more cleanup 2024-08-30 22:19:54 +10:00
psychedelicious
08761127c9 fix(ui): upscale tab graph 2024-08-30 22:19:54 +10:00
psychedelicious
4a10010b6c fix(ui): sdxl graph builder 2024-08-30 22:19:54 +10:00
psychedelicious
14cc5e2453 fix(ui): select next entity in the list when deleting 2024-08-30 22:19:54 +10:00
psychedelicious
3d87adea60 feat(ui): fix delete layer hotkey 2024-08-30 22:19:54 +10:00
psychedelicious
36e8232ab6 tidy(ui): "eye dropper" -> "color picker" 2024-08-30 22:19:54 +10:00
psychedelicious
72722a73be tidy(ui): regional guidance buttons 2024-08-30 22:19:54 +10:00
psychedelicious
a09aa232a9 feat(ui): update entity list menu 2024-08-30 22:19:54 +10:00
psychedelicious
7ae8b64699 feat(ui): add log debug button 2024-08-30 22:19:54 +10:00
psychedelicious
60e0d17f34 chore(ui): lint 2024-08-30 22:19:54 +10:00
psychedelicious
bf8bef2f00 chore(ui): prettier 2024-08-30 22:19:54 +10:00
psychedelicious
b586d67bac chore(ui): eslint 2024-08-30 22:19:54 +10:00
psychedelicious
31e5e5af13 tidy(ui): remove unused stuff 4 2024-08-30 22:19:35 +10:00
psychedelicious
94871e88cd tidy(ui): remove unused stuff 3 2024-08-30 22:18:50 +10:00
psychedelicious
00e56d1968 tidy(ui): remove unused pkg @chakra-ui/react-use-size 2024-08-30 22:18:50 +10:00
psychedelicious
43672a53ab feat(ui): revise graph building for control layers, fix issues w/ invocation complete events 2024-08-30 22:18:50 +10:00
psychedelicious
45097ed2a6 feat(ui): use unique id for metadata in Graph class 2024-08-30 22:18:50 +10:00
psychedelicious
871f6b9f95 tidy(ui): remove unused stuff 2 2024-08-30 22:18:50 +10:00
psychedelicious
e6476e3c75 tidy(ui): remove unused stuff 2024-08-30 22:18:50 +10:00
psychedelicious
ac9b5f246d tidy(ui): reduce use of parseify util 2024-08-30 22:18:50 +10:00
psychedelicious
8bc72a2744 feat(ui): refine canvas entity list items & menus 2024-08-30 22:18:50 +10:00
psychedelicious
f76f1d89d7 feat(ui): canvas layer preview, revised reactivity for adapters 2024-08-30 22:18:50 +10:00
psychedelicious
7b54762b5e feat(ui): add SyncableMap
Can be used with useSyncExternal store to make a `Map` reactive.
2024-08-30 22:18:50 +10:00
psychedelicious
bc6faf6a6d tidy(ui): removed unused transform methods from canvasmanager 2024-08-30 22:18:50 +10:00
psychedelicious
e7ae1ac9b2 feat(ui): transform tool ux 2024-08-30 22:18:50 +10:00
psychedelicious
dcb436adb1 feat(ui): rough out canvas mode 2024-08-30 22:18:50 +10:00
psychedelicious
80f0441905 feat(ui): add canvas autosave checkbox 2024-08-30 22:18:50 +10:00
psychedelicious
8cde803654 fix(ui): memory leak when getting image DTO
must unsubscribe!
2024-08-30 22:18:50 +10:00