Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 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:

Description

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 12 years ago.
24405.2.diff (975 bytes) - added by MikeHansenMe 12 years ago.
minor update to previous patch
24405.2.patch (596 bytes) - added by DrewAPicture 11 years ago.

Download all attachments as: .zip

Change History (14)

@DrewAPicture
12 years ago

#1 follow-up: @nacin
12 years ago

Was this stuff js-only in 3.5?

#2 in reply to: ↑ 1 @DrewAPicture
12 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
12 years ago

I pretty much get an endless spinner and basically blank page with no-js:
http://f.cl.ly/items/1B120C2b0t1K1o0I2d2i/Screen%20Shot%202013-05-23%20at%203.50.25%20PM.png

#4 @nacin
12 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
12 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
12 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
12 years ago

@nacin:

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?

@MikeHansenMe
12 years ago

minor update to previous patch

#8 @MikeHansenMe
12 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
11 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.

http://f.cl.ly/items/123M0o050U300g2U1F3r/Screen%20Shot%202013-07-03%20at%207.32.38%20PM.png

Just to give you an idea, this is what it looked like with the error class still applied:
http://f.cl.ly/items/3g0P063a1n0524212f3i/Screen%20Shot%202013-07-03%20at%207.38.10%20PM.png

#10 @markjaquith
11 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.


11 years ago

Note: See TracTickets for help on using tickets.