Page MenuHomePhabricator

jQuery Mobile compatibility with jQuery 3
Closed, ResolvedPublic

Description

jQuery Mobile 1.4.5 seems to be incompatible with jQuery 3, to which MediaWiki will be switching soon (at the very least it prints warnings in the console, I did not test much beyond that). According to https://github.com/jquery/jquery-mobile/issues/8546#issuecomment-271163317, jQuery Mobile 1.5 will be compatible with jQuery 3. It doesn't seem to have been released at http://jquerymobile.com/ yet, so we might have to wait, or get it from their GitHub repo. Apparently http://jquerymobile.com/download-builder/ lets you download the alpha too.

Event Timeline

I don't think this should block the Wikimedia switch to jQ3, which is the current parent task.

Timeless is only deployed in beta right now, so yes, it doesn't block Wikimedia deployment of jQuery 3. (Scope of the parent task is a bit unclear.)

Timeless is only deployed in beta right now, so yes, it doesn't block Wikimedia deployment of jQuery 3. (Scope of the parent task is a bit unclear.)

Parent task is for MediaWiki core to upgrade to jQuery 3. Technically, that is already done.

For one or two release cycles, we will keep jQuery Migrate available and enabled as well, which covers all supported API changes and breaking changes. However, we're not keeping jQuery 1.x at the same time as, with jQuery Migrate enabled, there aren't any other breaking changes - aside from changes to unsupported/undocumented behaviour that could've just as easily happened in a minor release. And besides, it would be too much for core and all other code to simultaneously support 1.x, 3.x and 3.x+migrate.

jQuery 3 has already been the default in MediaWiki master for 3 months (since April), which affects local development (incl. MediaWiki-Vagrant) and continuous integration. If there are noticeable defects in extensions for so long, presumably this would've been raised sooner? What is actually broken (aside from it officially not being supported)?
Perhaps Timeless could hot-patch any immediate issue meanwhile, like we did for jQuery UI in MediaWiki core? Alternatively, if it's not being maintained, we may need to re-evaluate it's presence on Beta Cluster.

jQuery 3 will go to Beta Cluster this week or next, and hopefully to production a week or two after that - at which point the unused jQuery 1.x code can be removed from core.

As for any other changes that happen in the master branch during development, extensions and skins have until November 2017 (when the 1.30-alpha cycle ends) to account for any changes that require subsequent changes in their code.

matmarex renamed this task from Upgrade jQuery Mobile to 1.5 to Upgrade jQuery Mobile to 1.5 (jQuery 3 compatibility).Jun 7 2017, 9:01 PM

This isn't just timeless. I recall shoving jquery mobile into a bunch of skins for better mobile support, and I probably wasn't the only one (I believe I was copying another skin from the start) - do we have any quick way to check which all have this, or a version of this?

Timeless seems to be the only skin with jQuery Mobile in our version control, unless someone use some screwy filename for it somewhere.

$ find . | grep -i jquery | grep -i mobile
./Timeless/resources/libraries/jquery.mobile.custom.js

Also refreshed, but I don't have all the others downloaded.

./Refreshed/refreshed/jquery.mobile.custom.min.js
./Refreshed/refreshed/jquery.mobile.custom.src.js

@Isarra I'm not sure how you found those (guessing you had an old cloned version of Refreshed?), but those were removed in v3.1.5 -
https://gerrit.wikimedia.org/r/#/c/330101/

I did git pull. Just now. It says it's up-to-date.

Okay, so my local environment is broken. Okay. Now to find out how to even update. Or what it was for to begin with!

Change 371508 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/skins/Timeless@master] Update jQuery Mobile to 1.5 (alpha)

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

Change 371511 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/skins/Timeless@master] Fix JQMIGRATE warnings in jQuery Mobile

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

Change 371511 merged by jenkins-bot:
[mediawiki/skins/Timeless@master] Fix JQMIGRATE warnings in jQuery Mobile

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

Change 371508 abandoned by Bartosz Dziewoński:
Update jQuery Mobile to 1.5 (alpha)

Reason:
Doesn't seem useful in resolving our issues, actually. Let's only do https://gerrit.wikimedia.org/r/371511.

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

matmarex renamed this task from Upgrade jQuery Mobile to 1.5 (jQuery 3 compatibility) to jQuery Mobile compatibility with jQuery 3.Aug 11 2017, 6:45 PM
matmarex closed this task as Resolved.
matmarex removed a project: Patch-For-Review.

Change 371508 restored by Bartosz Dziewoński:
Update jQuery Mobile to 1.5 (alpha)

Reason:
Actually, per T174545 it seems this is needed after all.

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

Change 371508 merged by jenkins-bot:
[mediawiki/skins/Timeless@master] Update jQuery Mobile to 1.5 (alpha)

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