[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Deprecate jquery.throttle-debounce in favour of (mw.util|OO.ui).debounce/throttle
Closed, ResolvedPublic

Description

Timeline:

Details

SubjectRepoBranchLines +/-
mediawiki/coremaster+1 -263
mediawiki/extensions/Flowmaster+6 -7
mediawiki/extensions/CentralNoticemaster+3 -3
mediawiki/extensions/LiveChatmaster+2 -2
mediawiki/extensions/GettingStartedmaster+3 -3
mediawiki/skins/Metrolookmaster+4 -4
mediawiki/extensions/MassMessagemaster+187 -136
mediawiki/extensions/MassMessagemaster+0 -1
mediawiki/extensions/ExternalGuidancemaster+2 -1
mediawiki/extensions/3Dmaster+3 -2
mediawiki/extensions/Translatemaster+46 -5
mediawiki/extensions/MultimediaViewermaster+8 -9
mediawiki/coremaster+3 -3
mediawiki/coremaster+40 -0
mediawiki/coremaster+99 -22
mediawiki/extensions/Graphmaster+3 -3
mediawiki/extensions/InputBoxmaster+2 -2
mediawiki/extensions/Wikibasemaster+2 -4
mediawiki/extensions/WikidataPageBannermaster+2 -2
mediawiki/extensions/Kartographermaster+2 -2
mediawiki/extensions/RelatedArticlesmaster+2 -2
mediawiki/coremaster+48 -9
mediawiki/skins/Vectormaster+4 -4
mediawiki/coremaster+0 -1
mediawiki/coremaster+9 -4
mediawiki/coremaster+0 -4
mediawiki/coremaster+4 -0
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 664229 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikidataPageBanner@master] Remove usage of deprecated jquery.throttle-debounce module

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

So, with https://gerrit.wikimedia.org/r/664228 the simple EventSingletonManager utility gets a dependency on the heavy and unrelated OOUI…

As more, this dependency isn't enforced, i.e. all codes that require() this module should make sure OOUI is loaded, and nothing states nor enforces this.

So, with https://gerrit.wikimedia.org/r/664228 the simple EventSingletonManager utility gets a dependency on the heavy and unrelated OOUI…

The whole RL module is depending on ooui already so it's guaranteed to be loaded before this file is executed

As more, this dependency isn't enforced, i.e. all codes that require() this module should make sure OOUI is loaded, and nothing states nor enforces this.

it gets enforced through resource loader

Change 664229 merged by jenkins-bot:
[mediawiki/extensions/WikidataPageBanner@master] Remove usage of deprecated jquery.throttle-debounce module

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

Change 664228 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use ooui debounce and throttle instead of deprecated jquery one

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

Change 682998 had a related patch set uploaded (by Seb35; author: Seb35):

[mediawiki/extensions/Translate@master] Replace deprecated jQuery.throttle/debounce

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

Change 683034 had a related patch set uploaded (by Seb35; author: Seb35):

[mediawiki/extensions/InputBox@master] Replace deprecated jQuery.debounce

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

Change 683039 had a related patch set uploaded (by Seb35; author: Seb35):

[mediawiki/extensions/MultimediaViewer@master] Replace deprecated jQuery.throttle/debounce

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

Change 683034 merged by jenkins-bot:

[mediawiki/extensions/InputBox@master] Replace use of deprecated $.debounce()

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

Change 684059 had a related patch set uploaded (by Seb35; author: Seb35):

[mediawiki/core@master] Replace use of deprecated $.debounce()

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

I’ve done a few patches, and I find OOUI is quite heavy if used only for the function throttle or “debounce with immediate execution” (mw.util.debounce executes after the delay, not before).

The “immediate debounce” is needed in mediawiki.page.gallery and the throttle is needed in Translate and MobileFrontend. It can be used inline versions, but I’m moderately enthusiastic about that because of code duplication -- it is always a question of balance between maintainability and performance as already said above.

Change 756128 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/Graph@master] Replace jquery.debounce with OO.ui.debounce

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

Change 756128 merged by jenkins-bot:

[mediawiki/extensions/Graph@master] Replace jquery.debounce with OO.ui.debounce

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

It would've been nice to use the same function signature as OOUI, now we have

OO.ui.debounce( callback, wait [, immediate] );
//and
mw.util.debounce( wait, callback );

(ContentTranslation's utils also uses callback, wait, immedate as ported from the same source as underscore.js)

Given we know that the arguments have to be number and Function it's not too late to "fix" it with some type checks (and deprecating the old signature).

It would also be sensible to add the immediate arg, as it is generally useful (e.g. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/684059/)

nb jQuery.throttle also had an immediate arg, but put it in the middle just to be difficult: delay [, at_begin ], callback

Change 759748 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/core@master] mw.util.debounce: Use same implementation as OO.ui.debounce

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

Change 759748 merged by jenkins-bot:

[mediawiki/core@master] mediawik.util: Use same debounce implementation as OO.ui.debounce

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

Change 760584 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/core@master] mw.util: Add throttle function, ported from OOUI

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

Change 760584 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.util: Add throttle function, ported from OOUI

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

Change 684059 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.page.gallery: Replace use of deprecated $.debounce()

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

Esanders renamed this task from Deprecate jquery.throttle-debounce in favour of mw.util.debounce or OO.ui.debounce/throttle to Deprecate jquery.throttle-debounce in favour of (mw.util|OO.ui).debounce/throttle.Feb 8 2022, 12:53 PM

Change 683039 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Replace deprecated jQuery.throttle/debounce

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

Change 682998 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Replace deprecated jQuery.throttle/debounce

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

Change 773381 had a related patch set uploaded (by Dylsss; author: Dylsss):

[mediawiki/extensions/3D@master] Replace use of deprecated jQuery.debounce

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

Change 773381 merged by jenkins-bot:

[mediawiki/extensions/3D@master] Replace use of deprecated jQuery.debounce

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

Change 795632 had a related patch set uploaded (by Ori; author: Ori):

[mediawiki/extensions/ExternalGuidance@master] mw.externalguidance.special: replace use of deprecated $.debounce

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

Change 795632 merged by jenkins-bot:

[mediawiki/extensions/ExternalGuidance@master] mw.externalguidance.special: replace use of deprecated $.debounce

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

Change 829286 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MassMessage@master] Convert Special:MassMessage to use OOUI

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

Change 829286 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Convert Special:MassMessage to use OOUI

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

Change 830939 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MassMessage@master] Remove jquery.throttle-debounce from dependencies

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

Change 830939 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Remove jquery.throttle-debounce from dependencies

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

Change 831128 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/skins/Metrolook@master] Use mw.util.debounce() in collapsibleTabs.js

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

Change 831128 merged by jenkins-bot:

[mediawiki/skins/Metrolook@master] Use mw.util.debounce() in collapsibleTabs.js

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

Change 831135 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/GettingStarted@master] Replace use of deprecated $.throttle() with mw.util.throttle()

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

Change 831137 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/CentralNotice@master] Replace use of deprecated $.debounce() with mw.util.debounce()

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

Change 831135 merged by jenkins-bot:

[mediawiki/extensions/GettingStarted@master] Replace use of deprecated $.throttle() with mw.util.throttle()

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

Change 831138 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/Flow@master] Replace use of deprecated $.throttle() with mw.util.throttle()

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

Change 831139 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/LiveChat@master] Replace use of deprecated $.debounce() with mw.util.debounce()

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

Change 831139 merged by jenkins-bot:

[mediawiki/extensions/LiveChat@master] Replace use of deprecated $.debounce() with mw.util.debounce()

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

Change 831141 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] resources: Drop jquery.throttle-debounce, deprecated since 1.33

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

Change 831137 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Replace use of deprecated $.debounce() with mw.util.debounce()

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

Change 831138 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Replace use of deprecated $.throttle() with mw.util.throttle()

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

kostajh updated the task description. (Show Details)
kostajh removed a project: Growth-Team-Filtering.
kostajh moved this task from FY 2019-20 to Triaged on the Growth-Team board.

Change 831141 merged by jenkins-bot:

[mediawiki/core@master] resources: Drop jquery.throttle-debounce, deprecated since 1.33

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