sanity icon indicating copy to clipboard operation
sanity copied to clipboard

feat(portable-text-editor): preserve keys on undo/redo

Open skogsmaskin opened this issue 4 months ago • 3 comments

Description

Previously when doing undo/redo in the PortableTextEditor it would generate new keys for the created content.

With this change, the keys will be preserved along with the original content. This makes it possible to support situations where something externally depends on the previous content's keys, it will be possible to restore that dependency when calling undo after an operation breaks it.

I have also introduced some unit tests for undo/redo that will test this functionality. Previously we only had e2e tests for undo/redo.

What to review

Manual testing, unit test, and e2e tests seem to verify that there are no issues with this change. But could it be something we are not thinking of here?

Testing

Should be covered by unit tests.

Notes for release

  • Preserve content keys when doing undo/redo in the Portable Text Editor.

skogsmaskin avatar Feb 20 '24 19:02 skogsmaskin