Page MenuHomePhabricator

AfC: IE11 - not possible to switch between 'New Page Patrol' and 'Articles for Creation" options
Closed, ResolvedPublic

Description

The issue is present in betalabs and testwiki.

  1. In IE11, go Special:NewPagesFeed.
  2. Try to switch to another option filter option - either 'New Page Patrol' or to 'Articles for Creation'.
  3. Options for 'New Page Patrol' and 'Articles for Creation' are selectable but not affecting the result set.

Nothing is displayed in the Console.

Note: There is a warning to a user: "This tool may not work correctly in browsers older than Internet Explorer 11" - it implies that we should take care of the page functionality in IE11.

Event Timeline

Edge 17 does not have the issue described in the ticket, however

Screen Shot 2018-08-21 at 10.52.54 AM.png (646×945 px, 162 KB)
.

Change 463108 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/PageTriage@master] IE11: Use $.extend instead of Object.assign

https://gerrit.wikimedia.org/r/463108

I used EI11 on windows 8. I didn't see any banner about the browser being too old. The faulty javascript line generated an error in the console.

Change 463108 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] IE11: Use $.extend instead of Object.assign

https://gerrit.wikimedia.org/r/463108

[mediawiki/extensions/PageTriage@master] IE11: Use $.extend instead of Object.assign
https://gerrit.wikimedia.org/r/463108

I used EI11 on windows 8. I didn't see any banner about the browser being too old.

The IE11 browser isn't too old. https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix

MediaWiki uses a feature test to decide what browser is supported. We currently build our code on ES5. Object.assign is an ES6 feature, we don't support use of ES6 code yet, eventhough a subset of our supported browsers implement it, not all (per this issue).

It makes sense. I just specified it because the task description pretends there was one such banner on IE11.

"This tool may not work correctly in browsers older than Internet Explorer 11"

Ah, I see what you mean. That warning is presumably shown to users of IE10 and older. Which, given it exists there, suggests we care about it working in IE11 - where the banner is not shown :)

@SBisson

[...] the task description pretends there was one such banner on IE11.

IE11 on Windows7 and Windows10 - the banner is displayed:

Banner_IE11.png (1×1 px, 326 KB)

Yeah, from ext.pageTriage.listView.js:

var blacklist = { msie: [ '<', 8 ] };
// Add a warning if we're using an unsupported browser
if ( $.client.test( blacklist, null, true ) ) {
	$( '#mwe-pt-list-warnings' ).append( '<div>' + mw.msg( 'pagetriage-warning-browser' ) + '</div>' );
}
// Display whatever warnings we have
$( '#mwe-pt-list-warnings' ).show();

Maybe there is mw library code we could use instead of this for detecting the version.

Quick answers

  1. jquery-client is a library that we created ourselves. Nowadays such functionality would be exposed via mw or module.exports, but back in 2010 the de-facto way of exposing new functions in a reusable way (not specific to MediaWiki) was as a jQuery plugin.
  2. That check is for MSIE < 8, but it appears to return true for MSIE 11. that seems like a bug.

Note that as of this year, JS is disabled in IE10 and below. Which means the code doesn't run on IE8 or lower. In its current form, it's been superseded by MediaWiki core's base compatibility and no longer needs its own check. However, if in the future a similar needs arises, jquery-client would be fine way to use. It's what we use elsewhere as well.