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

Enable autosaves for non-drafts #12199

Merged
merged 2 commits into from
Sep 1, 2022
Merged

Conversation

swissspidy
Copy link
Collaborator

Context

See #1402 / #9859 for context.

Summary

This change removes* the isDraft check for the autosave handler, causing autosaves to work even if the story is private, scheduled, or published. For published stories, it will create a new revision.

We'll add a link for users to manage revisions soon, see #12197.

* It does not actually remove the check, just disable it if the autosave experiment is on.

Relevant Technical Choices

To-do

User-facing changes

No visual change.

Testing Instructions

  • This is a non-user-facing change and requires no QA

This PR can be tested by following these steps:

  1. Enable autosave experiment
  2. Publish a story
  3. Make some changes
  4. Wait a minute or so
  5. Observe network tab, see that an autosave happened

Reviews

Does this PR have a security-related impact?

No

Does this PR change what data or activity we track or use?

No

Does this PR have a legal-related impact?

No

Checklist

  • This PR addresses an existing issue and I have linked this PR to it in ZenHub
  • I have tested this code to the best of my abilities
  • I have verified accessibility to the best of my abilities (docs)
  • I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
  • This code is covered by automated tests (unit, integration, and/or e2e) to verify it works as intended (docs)
  • I have added documentation where necessary
  • I have added a matching Type: XYZ label to the PR

See #1402

…if the `improvedAutosaves` flag is enabled
@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature Group: WordPress Changes related to WordPress or Gutenberg integration Group: Workspace A group encompassing all of workspace – everything inside the canvas and sidebar labels Aug 31, 2022
@googleforcreators-bot
Copy link
Collaborator

googleforcreators-bot commented Aug 31, 2022

Plugin builds for 39d3eb9 are ready 🛎️!

@timarney
Copy link
Contributor

timarney commented Aug 31, 2022

Tested and it works --- looks like a unit test is failing

AutoSaveHandler › should not trigger saving in case of a non-draft post

@swissspidy
Copy link
Collaborator Author

Test should be fixed now 👍

@swissspidy swissspidy merged commit eb1a83d into main Sep 1, 2022
@swissspidy swissspidy deleted the add/1402-non-draft-autosaves branch September 1, 2022 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: WordPress Changes related to WordPress or Gutenberg integration Group: Workspace A group encompassing all of workspace – everything inside the canvas and sidebar Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants