[wp-trac] [WordPress Trac] #23497: Revisions Rewrite using JS/Backbone
WordPress Trac
noreply at wordpress.org
Thu Feb 28 15:07:37 UTC 2013
#23497: Revisions Rewrite using JS/Backbone
--------------------------------------------------+------------------------
Reporter: adamsilverstein | Owner: westi
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 3.6
Component: Revisions | Version: 3.5.1
Severity: normal | Resolution:
Keywords: has-patch needs-refresh dev-feedback |
--------------------------------------------------+------------------------
Comment (by westi):
Here are my notes from my pre-commit review and patch massaging. I focused
primarily on getting the Backbone view of things into a state which I was
happy to commit and in the process may have broken somethings accidentally
and also removed some changes from landing in this version.
Things I removed for now:
* I reverted the metabox changes to use the old list function - I think
we should discuss the best presentation we can for the meta box that still
gives instant access to each revision
Fixes I made:
* Security improvements - I tried to restore all the missing capability
checks but this needs a second review
* I added CSRF projection to the Ajax Request
* I tried to better scope the data we pass to the Backbone code by
wrapping it in a js object
* I switch the code back to support as much as possible old entry points
and not rename variables/query string args too much
* I fixed up translations which had leading or trailing whitespace - we
can't do this as it just gets "lost in translation" by accident
* I noted some TODO's
* I fixed up some of the variable naming to be more WP like but it could
do with a second pass so that it follows the coding style more closely
* I cleanup the enqueuing of js and css to use dependencies rather than
enqueuing many scripts.
* I was scared by all the Backbone code because it is currently outside
my comfort zone, I need to up-skill here :)
* I hid the "screen options" that allow you to switch between split view
and save autosaves - need to loop back and fix these up
Todos:
* Move the advance option stuff that is hidden to screen options or a
better place in the UI
* Fix the split translations noted in wp-admin/revisions.php to be safe
for RTL translation
* There are other TODO's in the code that need reviewing and handling
* Should we put back a no-js version of the code?
* Looks like the UI slider CSS references some images and I'm not sure we
have them on this ticket
* More testing of how the new UI works with plugins that use revisions.
Other things I checked:
* We preserved the {{{_wp_post_revision_field_$field}}} filters - they
moved to the ajax action
* Plugins that use CPT and revisions - e.g Jetpack Custom CSS worked fine
in my light testing
Other notes:
* This change probably breaks some of the other revisions patches, sorry
;)
I think this is good enough to commit and iterate on so we can move to
smaller easier to review patches :)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23497#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list