Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Sep 13, 2019

Conversation

@epiqueras
Copy link
Contributor

commented Sep 12, 2019

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 this to the Future milestone Sep 12, 2019
@epiqueras epiqueras requested a review from talldan as a code owner Sep 12, 2019
@epiqueras epiqueras self-assigned this Sep 12, 2019
@@ -390,6 +393,7 @@ export function* savePost( options = {} ) {
previousRecord.type,
previousRecord.id
) ),
...edits,

This comment has been minimized.

Copy link
@mcsf

mcsf Sep 12, 2019

Contributor

Could you explain this concatenation?

This comment has been minimized.

Copy link
@epiqueras

epiqueras Sep 12, 2019

Author Contributor

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

Copy link
Contributor

left a comment

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

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

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.

@mcsf
mcsf approved these changes Sep 13, 2019
Copy link
Contributor

left a comment

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
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@epiqueras epiqueras deleted the fix/autosaving-creating-edits branch Sep 13, 2019
@youknowriad youknowriad modified the milestones: Future, Gutenberg 6.5 Sep 14, 2019
dd32 pushed a commit to dd32/gutenberg that referenced this pull request Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Tightening Up
  
Awaiting triage
3 participants
You can’t perform that action at this time.