Include code editor in undo/redo

Created on 17 September 2025, 22 days ago

Overview

Include actions from the code editor in the undo history.

Proposed resolution

Once Include navigation events in undo/redo Active lands, undo/redo will cover three RTK slices: layoutModel, pageData, and navigation. They're all wrapped with the undoable() reducer enhancer by redux-undo, which means they all track their own history. To present a single, linear timeline to the user, uiSlice maintains an undoStack to track which which slice's state needs to be changed.

The navigation slice provides an action called setCurrentRouteWithChainedUndo, which can be used instead of useNavigate()from react-router-dom, so when the route change gets undone, the action prior to it also gets undone. This is useful for actions where the navigation happens as the result of the action, and we don't want to undo the navigation on its own. For example, adding a code component to the library navigates to the editor frame. A single undo action should undo both the navigation and adding the component to the library.

User interface changes

n/a

Feature request
Status

Postponed

Version

1.0

Component

Theme builder

Created by

🇳🇱Netherlands balintbrews Amsterdam, NL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024