Problem/Motivation

We're using redux to manage state
This makes redo/undo support reasonably straight forward

Steps to reproduce

Proposed resolution

Consider redux-undo package or implement our own per https://redux.js.org/usage/implementing-undo-history

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

larowlan created an issue. See original summary.

larowlan’s picture

Component: Code » Page builder
Issue tags: -page builder

hooroomoo made their first commit to this issue’s fork.

hooroomoo’s picture

Assigned: Unassigned » hooroomoo
jessebaker’s picture

As mentioned in the description, this is hopefully fairly easy to implement through Redux. I met with hooroomoo and we discussed that both the layout and model slices of the redux state will need to be added to the undo "array" so that changes to both the layout and the props/details of a component will be tracked as undo-able states.

wim leers’s picture

Issue tags: +Needs tests

Great to see this moving! 🤩

I suspect end-to-end tests using Cypress is overkill for this. (Happy to be wrong.) Unit tests seem appropriate for such a foundational capability?

hooroomoo’s picture

Will continue off 3450303-undo-redo now that sidepanels branch is merged

hooroomoo changed the visibility of the branch sidepanels-undo to hidden.

hooroomoo’s picture

Created #3452781: Add tests for undo/redo to write tests. Would like to get this in first since it has a good amount of refactoring.

hooroomoo’s picture

Status: Active » Needs review
wim leers’s picture

wim leers’s picture

Assigned: hooroomoo » jessebaker
Status: Needs review » Reviewed & tested by the community

Both @larowlan and @jessebaker have approved the MR.

I think that means this is RTBC?

But shouldn't we have (unit) tests prior to merging?

wim leers’s picture

Issue tags: -Needs tests
Related issues: +#3452781: Add tests for undo/redo

Ah, @jessebaker pointed out that for tests, we have the follow-up #3452781: Add tests for undo/redo, which is blocked on another issue. Great!

wim leers’s picture

Assigned: jessebaker » bnjmnm

Needs Ben's MR approval before it can be merged 👍

hooroomoo’s picture

Assigned: bnjmnm » Unassigned
Status: Reviewed & tested by the community » Fixed

lets goooo

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.