Skip to content

Editor: Don't edit the post when autosaving.#17420

Merged
epiqueras merged 1 commit intomasterfrom
fix/autosaving-creating-edits
Sep 13, 2019
Merged

Editor: Don't edit the post when autosaving.#17420
epiqueras merged 1 commit intomasterfrom
fix/autosaving-creating-edits

Conversation

@epiqueras
Copy link
Copy Markdown
Contributor

Description

This PR stops the editor from clearing redo levels when autosaving.

How has this been tested?

It was verified that autosaves no longer clear the redo stack.

Types of Changes

Bug Fix: Stop autosaves from clearing the redo stack.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@epiqueras epiqueras added [Type] Bug An existing feature does not function as intended [Package] Editor /packages/editor labels Sep 12, 2019
@epiqueras epiqueras added this to the Future milestone Sep 12, 2019
@epiqueras epiqueras requested a review from talldan as a code owner September 12, 2019 18:30
@epiqueras epiqueras self-assigned this Sep 12, 2019
previousRecord.type,
previousRecord.id
) ),
...edits,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain this concatenation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want autosaves to have the latest content. This makes sure of that without editing the entity.

Copy link
Copy Markdown
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, but there's still several concepts to track in just one action creator. We need tests for this sort of regression, could you work on it?

@epiqueras
Copy link
Copy Markdown
Contributor Author

Yes, this warrants more E2E tests, I made an issue for it: #17434. I think @ellatrix has already started working on it a bit as well.

Copy link
Copy Markdown
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, alright, let's not let #17434 stagnate, but I can approve this one in the meantime. :)

@epiqueras epiqueras merged commit 9b83d3f into master Sep 13, 2019
@epiqueras epiqueras deleted the fix/autosaving-creating-edits branch September 13, 2019 21:11
@youknowriad youknowriad modified the milestones: Future, Gutenberg 6.5 Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants