[wp-trac] [WordPress Trac] #23497: Revisions Rewrite using JS/Backbone

WordPress Trac noreply at wordpress.org
Thu Feb 28 23:40:11 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:  needs-patch needs-testing  |
---------------------------------------+------------------------

Comment (by adamsilverstein):

 thanks for the feedback/testing, i will try to address your notes. just to
 verify, did you create a new post for test? the existing code has known
 wonky behavior with existing posts that i'm looking to. i tried to
 reproduce what you did with a new post and did not get the problem you
 mention.

 i agree the a slider is bit ugly with too few revisions, and that whole
 row should get hidden if there is only one revision. once you get to the
 5-100 revisions range it works pretty well though.



 Replying to [comment:38 ocean90]:
 > Some results after a small review:
 >
 > ----
 >
 > Strange behavior:
 >
 > * I have a post with 3 revisions.
 > * I select the oldest one.
 > * I activate "Compare two revisions"
 > * I drag the right handler of the slider one step to the right.
 (Comparing current version to revision 2 of 3)
 > * I drag the left handler one step to the right. (Comparing revision 1
 to revision 2 of 3)
 > * I get ''Cannot compare revision to itself''.
 > * I drag the right handler one step to the right. (Comparing revision 1
 to revision 3 of 3)
 > * '''I get nothing.'''
 >
 > ----
 >
 > See http://cl.ly/NEKV and http://cl.ly/NFSN
 >
 > The whole line shouldn't be crossed out when just a word or sentence has
 been removed.
 > `text-decoration: line-through` should be removed from `table.diff
 .diff-deletedline` and added to `table.diff .diff-deletedline del`.
 >
 >
 > ----
 >
 > From the JS console (Chrome)
 >
 >
 > {{{
 > Uncaught TypeError: Cannot call method 'replace' of undefined
 underscore.min.js:5
 > w.template underscore.min.js:5
 > (anonymous function) template.js:24
 > jQuery.extend.access jquery.js:866
 > jQuery.fn.extend.html jquery.js:6038
 > _.extend.Options.Backbone.View.extend.render revisions.js:314
 > wp.revisions.App.Backbone.Router.extend.revisionDiffSetup
 revisions.js:212
 > self._revisions.fetch.success revisions.js:189
 > a.success backbone.min.js:23
 > fire jquery.js:1037
 > self.fireWith jquery.js:1148
 > done jquery.js:8074
 > callback
 > }}}
 >
 > ----
 >
 > `wpRevisionsSettings` should be added via `wp_localize_script()`.
 >
 >
 > ----
 >
 > Is there a way to avoid the use of `onClick` attributes?
 >
 >
 > ----
 >
 > `tmpl-revisionvinteract` has missing gettext calls. (Next/Prev)
 >
 >
 > ----
 >
 > Would be nice, if we can rewrite the CSS class names to add some dashes.
 >
 > ----
 >
 > Finally: I'm not a huge fan of the use of a slider here. Sliders doesn't
 work good if there are too few revisions/steps (the next step is 200px
 away) or too many revisions/steps (each pixel is a new step).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23497#comment:40>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list