Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28830 closed defect (bug) (fixed)

Media Grid: No-JS fallback

Reported by: helen's profile helen Owned by: helen's profile helen
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: needs-patch
Focuses: administration Cc:

Description

Right now you get a blank screen, which is not acceptable. We need the header with Add New link and a link back to the list mode at the very least. Mode is sticky, so it should only happen once.

See #24716

Attachments (4)

28830.diff (436 bytes) - added by michalzuber 10 years ago.
<noscript> solution
28830.1.diff (486 bytes) - added by michalzuber 10 years ago.
.hide-if-js solution
28830.2.diff (502 bytes) - added by michalzuber 10 years ago.
Changed text to be more human friendly.
28830.3.diff (514 bytes) - added by ericlewis 10 years ago.

Download all attachments as: .zip

Change History (17)

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


10 years ago

@michalzuber
10 years ago

<noscript> solution

#2 @michalzuber
10 years ago

ocean90 fixed the button in [29136]
Added simple <noscript> solution.

#3 @ocean90
10 years ago

  • Version set to trunk

Or:

<div class="error hide-if-js">
	<p><?php _e( 'Media Grid requires enabled JavaScript. Switch to <a href="upload.php?mode=list">table listing</a>.' ); ?></p>
</div>

#4 follow-up: @ericlewis
10 years ago

Re: the exact wording, "Media Grid" will read jargony to the typical user. How about "The media grid view" instead?

#5 in reply to: ↑ 4 @kpdesign
10 years ago

Replying to ericlewis:

Re: the exact wording, "Media Grid" will read jargony to the typical user. How about "The media grid view" instead?

I agree. Perhaps something like this?

The media grid view requires JavaScript to be enabled. Switch to the table listing.

@michalzuber
10 years ago

.hide-if-js solution

#6 @michalzuber
10 years ago

Thank you for the ideas, much better.
http://i.imgur.com/tsyTirS.png

#7 @michalzuber
10 years ago

To minimize support questions on enabling JavaScript it could be like this

http://i.imgur.com/gZeTYci.png

<div class="error hide-if-js">
    <p><?php _e( 'The media grid view requires JavaScript to be enabled.' ); ?></p>
    <ol>
        <li><a href="upload.php?mode=list"><?php _e( 'Switch to the table listing.' ); ?></a></li>
        <li><a href="http://www.enable-javascript.com/" target="_blank"><?php _e( 'Enable JavaScript
in your web browser.' ); ?></a></li>
    </ol>
</div>

#8 @wonderboymusic
10 years ago

We could drop a meta refresh tag that will kick them over to the list view

#9 @michalzuber
10 years ago

Yes good one, I thought about it too, but if he has disabled JavaScript he should be noticed that the usage experience would degrade without JS. That's why I added the second link. Educate the visitor a bit :)
But meta http redirect can be timed, so should we add that with a 3 sec timeout? But in this scenario we might confuse the visitor with error message and then redirecting him.

#10 @kpdesign
10 years ago

I would not add a timed redirect. The user needs time to read the error message and decide what they want to do.

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


10 years ago

@michalzuber
10 years ago

Changed text to be more human friendly.

#12 @ericlewis
10 years ago

  • Summary changed from No-JS fallback for Media Grid to Media Grid: No-JS fallback

@ericlewis
10 years ago

#13 @helen
10 years ago

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

In 29175:

No-JS fallback for the Media Library grid view. props michalzuber. fixes #28830, see #24716.

Note: See TracTickets for help on using tickets.