Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#24405 closed defect (bug) (fixed)

Revisions needs a functional fallback for no-js

Reported by: drewapicture's profile DrewAPicture Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: high
Severity: blocker Version: 3.6
Component: Revisions Keywords: ux-feedback has-patch
Focuses: Cc:


Since editing, comparing and restoring revisions requires javascript, we should not make it possible open revisions from the editing screen.

In the patch, I took a stab at adding an error message to the Revisions metabox as well as a solution for disabling the edit link if no-js. Not a huge fan of tacking on an extra span to $date just for no-js, but as far as I'm aware, we don't have a way to test for javascript support in PHP.

Attachments (3)

24405.patch (991 bytes) - added by DrewAPicture 10 years ago.
24405.2.diff (975 bytes) - added by MikeHansenMe 10 years ago.
minor update to previous patch
24405.2.patch (596 bytes) - added by DrewAPicture 10 years ago.

Download all attachments as: .zip

Change History (14)

10 years ago

#1 follow-up: @nacin
10 years ago

Was this stuff js-only in 3.5?

#2 in reply to: ↑ 1 @DrewAPicture
10 years ago

Replying to nacin:

Was this stuff js-only in 3.5?

Looking at 3.5 with no-js, seems like you could compare, review and restore with no-js. It was my impression that revisions in 3.6+ is Backbone-reliant for almost everything.

#3 @DrewAPicture
10 years ago

I pretty much get an endless spinner and basically blank page with no-js:

#4 @nacin
10 years ago

  • Severity changed from normal to blocker

Then that's bad. We can't degrade like that.

The best solution would likely be to keep the old UI as a no-JS fallback.

#5 @DrewAPicture
10 years ago

  • Keywords needs-patch added; has-patch removed
  • Summary changed from Hide revisions' edit links if no-js to Revisions needs a functional fallback for no-js

#6 @nacin
10 years ago

We're considering dropping revisions for no-JS entirely. It's a fairly esoteric feature. If we do that, we'll need to also hide the links in the meta box (but may not need to hide the meta box itself).

#7 @DrewAPicture
10 years ago


The original patch hid the links in a not-exactly-awesome way, but at least users could see they had revisions. I'm not sure there's much value in seeing the revisions list without being able to restore and compare them, unless we make it apparent that turning on Javascript would enable the feature.

On that token, we don't necessarily have to introduce a unique string here, in fact we could create a generalized, reusable one, like 'Javascript must be enabled to use this feature.', or something. Thoughts?

10 years ago

minor update to previous patch

#8 @MikeHansenMe
10 years ago

  • Cc mdhansen@… added
  • Keywords has-patch added; needs-patch removed

I like the generic string that can be reused if it is ever needed. I also added <p> tags to the warning.

#9 @DrewAPicture
10 years ago

24405.2.patch tweaks the generic string and hides the unordered list for no-js. I opted to remove the error class because it's not really an error, more of a notification.

Just to give you an idea, this is what it looked like with the error class still applied:

#10 @markjaquith
10 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In 24557:

Hide the Revisions meta box content if no-JS, as JS is required to actually do anything with revisions.

fixes #24405. props DrewAPicture, MikeHansenMe.

This ticket was mentioned in IRC in #wordpress-dev by ericandrewlewis. View the logs.

9 years ago

Note: See TracTickets for help on using tickets.