InvokeAI
InvokeAI copied to clipboard
feat(ui): tabbed canvases
Summary
A new feature was implemented to enable multiple canvases in the canvas editor.
SliceConfigwas updated intypes.jsto handle partially undoable slices:- new generic parametes,
TInternalStateandTSerializedState, were added to strongly type states used in Redux and the persisted into storage - new functions,
wrapStateandunwrapState, were added to themigratefield for wrapping/unwrapping state during serialization/deserialization undoableConfigwas deleted, asreduxUndoOptionsis used only in slices, so this field became redundant
- new generic parametes,
store.tswas refactored to use the updatedSliceConfig- new schemas,
zStateWithHistory,zCanvasStateWithHistory,zCanvasesState,zCanvasesStateWithHistoryandzCanvasesStateWithoutHistory, were created intypes.tsto represent types in the partially undoable canvases slice - new selectors,
selectCanvasesselectSelectedCanvasWithHistoryandselectSelectedCanvas, were added toselectors.tsto isolate changes due to refactoring in the canvas slice from components canvasSlicewas split into two parts representing thecanvasesslice without history and thecanvaswith undoable historyundoableCanvasesReducerhigher order reducer was created to combinecanvasesandcanvasreducersRTKwas updated to version2.9.0
Related Issues / Discussions
Closes #8380
Checklist
- [x] The PR has a short but descriptive title, suitable for a changelog
- [ ] Tests added / updated (if applicable)
- [ ] ❗Changes to a redux slice have a corresponding migration
- [ ] Documentation added / updated (if applicable)
- [ ] Updated
What's Newcopy (if doing a release after this PR)