-
Notifications
You must be signed in to change notification settings - Fork 806
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
Add module that creates a permanent revision from a significantly modified autosave #13148
Conversation
…ified autosave When the editor does an autosave repeatedly, create a permanent revision from the old autosave if the new one is significantly different. Makes losing edited content less likely. Adapted from a WP.com patch (D30389-code), converted the code to a Jetpack module and added (optional) recording of StatsD events using the new `jetpack_stats_statsd` action (that will be hooked into on WP.com).
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: August 6, 2019. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are adding a brand new file, could you add it to the PHPCS whitelist?
https://github.com/Automattic/jetpack/blob/5a2bb2b2423a42a59ced3674f30339605fbc7fd5/bin/phpcs-whitelist.js
That will allow you to get some recommendations on commit, and to fix any PHPCS issues on the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Works like WPCOM version of the patch. BTW, I'm not a Jetpack code owner so you'll need ✅ from @jeherve .
Yes! 🙂 This PR will be most likely closed and we'll ship the code to Atomic via a different route. Let's keep in open while other options are evaluated. |
We shipped this to Atomic as part of wpcomsh instead, can be closed. Thanks everyone for cooperation. |
When the editor does an autosave repeatedly, create a permanent revision from the old
autosave if the new one is significantly different. Makes losing edited content less
likely.
Adapted from a WP.com patch (D30389-code), converted the code to a Jetpack module and
added (optional) recording of StatsD events using the new
jetpack_stats_statsd
action(that will be hooked into on WP.com).
Fixes an issue reported in Calypso repo: Automattic/wp-calypso#20265
Testing instructions:
(adapted from D30389-code)
This module creates a permanent revision if new autosave's content length is more than 250 characters smaller or bigger than the old one's.
Proposed changelog entry for your changes: