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

WordPress Trac noreply at wordpress.org
Sat Mar 9 00:04:30 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 bpetty):

 Replying to [comment:60 adamsilverstein]:
 >  * did you do this test using the latest trunk? the code was updated
 recently and some of this sounds like buggy behavior that was fixed,
 please try with latest updates to see if you still have the issues; i was
 not able to reproduce the bug you described creating a new post and
 revising it --  the revisions screen worked as expected (although with the
 direction reversed)


 I just did some testing in (completely) up-to-date SVN trunk, and I don't
 know how you didn't see errors because I spotted *several* problems right
 away. Both in my own testing, and in your own video.

 A. When creating a new post or page (with JS turned on), there are no
 revisions of the post, so the "Revisions" screen option isn't even
 available unless you have two revisions. The problem here is that if the
 second revision is an autosave (from JS), the revisions still don't show
 up on the edit screen like they do when you publish a second revision
 since it doesn't actually post the entire page, it's just an AJAX request
 (this might be an old problem though). This isn't a big deal since compare
 doesn't work at all with only one non-autosave revision anyway, however,
 this points me to a second problem...

 B. (with JS off) When opening a page or post with one revision and an
 additional autosave revision, the "Revisions" widget on the edit page
 lists the revisions (properly), but with links to compare, which end up on
 a blank compare page with no explanation about what happened, but there's
 actually two problems here. First, JS was off, so it just doesn't load
 anything, hence the blank page. Second, if JS is actually on, it *does*
 load a comparison with only one revision, but you're saying that shouldn't
 even be possible without at least two non-autosave revisions to compare -
 but it happens (and in fact, it's actually correct about the revision
 info, and the comparison diff content for once surprisingly - hey,
 creation of a page/post is an edit from nothing to something and even
 Wikipedia and all VCS diff apps will show a diff on that).

 C. As hinted to in (B), the diff content is entirely incorrect in several
 different situations (which I am finding tough to consistently reproduce,
 however, one bug or another keeps popping up with *every* single test I
 do, I just don't always know which one is next - so they aren't hard to
 spot). In one case, with 3 non-autosave revisions each only changing one
 line, and with only one line of content, I have been able to get the
 comparison to somehow end up with *two* lines of content from two
 different revisions on the same side of the diff, one line right after the
 other. That should definitely never happen. Fix the other bugs mentioned
 here first, and then it might be easier to reproduce and squash this bug
 (I'll come back again later to test again I'm sure).

 D. I did one test (without autosaves) where I created a post with "one",
 updated with "two", reverted to "one" (which worked), and updated the post
 with "four" (since it's the fourth revision), and while in comparison view
 (no matter how I got there from any revision), if the slider is on any of
 the revisions, it always showed "four" as being added even though it was
 only added in the last revision.


 >  * the 'compare two revisions' should not be available if there are
 fewer than three revisions


 This could be a little hard to test since it's tough to ensure an autosave
 doesn't sneak in right now, maybe just disable JS while testing (and re-
 enable on compare). That may have happened in Mike's test. In my own
 testing, I never did see the "compare two revisions" option unless I had
 at least 3 revisions.


 > here is a screen recording of my test trying to reproduce the error you
 outline: http://cl.ly/NQb0


 There are definitely errors right here in your own video...

 E. After you save the "revise" content, you clicked on the "22:03:08"
 revision, which was the oldest and first revision, however, the comparison
 page always opens on the latest revision first every time (which in your
 case was the "22:03:11" revision - from "test" to "revise").

 F. The first time you move the slider to the right, it says it's comparing
 the oldest "22:03:08" revision, which should have been the change from
 nothing to "test", not from nothing to "revise" - in fact, this
 removed/added combo *never* happens in any single revision - that's only
 if you compared two revisions from the non-existent post to the final
 "revise" post.

 G. When you click "restore revision", this is super confusing... what are
 you restoring? If it was the oldest revision's content, shouldn't your
 content have been "test" and not an empty post? Why was your content
 completely empty, but the title wasn't? If you click "restore" with the
 latest revision selected, doesn't that actually mean that nothing should
 happen? Shouldn't the restore button be disabled on the latest revision
 diff?

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


More information about the wp-trac mailing list