Skip to content

Conversation

csehatt741
Copy link
Contributor

@csehatt741 csehatt741 commented Sep 10, 2025

Summary

A new feature was implemented to enable multiple canvases in the canvas editor.

  • SliceConfig was updated in types.js to handle partially undoable slices:
    • new generic parametes, TInternalState and TSerializedState, were added to strongly type states used in Redux and the persisted into storage
    • new functions, wrapState and unwrapState, were added to the migrate field for wrapping/unwrapping state during serialization/deserialization
    • undoableConfig was deleted, as reduxUndoOptions is used only in slices, so this field became redundant
  • store.ts was refactored to use the updated SliceConfig
  • new schemas, zStateWithHistory, zCanvasStateWithHistory, zCanvasesState, zCanvasesStateWithHistory and zCanvasesStateWithoutHistory, were created in types.ts to represent types in the partially undoable canvases slice
  • new selectors, selectCanvases selectSelectedCanvasWithHistory and selectSelectedCanvas, were added to selectors.ts to isolate changes due to refactoring in the canvas slice from components
  • canvasSlice was split into two parts representing the canvases slice without history and the canvas with undoable history
  • undoableCanvasesReducer higher order reducer was created to combine canvases and canvas reducers
  • RTK was updated to version 2.9.0

Related Issues / Discussions

Closes #8380

Checklist

  • 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 New copy (if doing a release after this PR)

@github-actions github-actions bot added frontend-deps PRs that change frontend dependencies frontend PRs that change frontend files labels Sep 10, 2025
@csehatt741 csehatt741 changed the title feat(ui): canvas slice refactored to support tabbed canvases feat(ui): tabbed canvases Sep 10, 2025
@csehatt741 csehatt741 force-pushed the feat/tabbed-canvases branch 3 times, most recently from 53b8941 to dfd6b5a Compare September 15, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files frontend-deps PRs that change frontend dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement]: Tabbed Canvases
1 participant