[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 Gilles Dubuc gdu...@wikimedia.org changed: What|Removed |Added Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #11 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 145391 merged by jenkins-bot: Remove data('events') usage in jquery.triggerQueueCallback https://gerrit.wikimedia.org/r/145391 -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #12 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 145393 merged by jenkins-bot: Use the new .bindQueueCallback() instead of .bind() https://gerrit.wikimedia.org/r/145393 -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 James Forrester jforres...@wikimedia.org changed: What|Removed |Added CC||jforres...@wikimedia.org --- Comment #13 from James Forrester jforres...@wikimedia.org --- I now just get JQMIGRATE: jQuery.fn.andSelf() replaced by jQuery.fn.addBack() when seeking, which is an improvement! -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #14 from Gilles Dubuc gdu...@wikimedia.org --- James: that warning is actually coming from jQuery UI in core. I'm guessing there's a separate plan to update that, isn't there? -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #15 from James Forrester jforres...@wikimedia.org --- (In reply to Gilles Dubuc from comment #14) James: that warning is actually coming from jQuery UI in core. I'm guessing there's a separate plan to update that, isn't there? Aha, cool. Does that mean we can mark this as fixed? :-) -- You are receiving this mail because: You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #9 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 145391 had a related patch set uploaded by Gilles: Remove data('events') usage in jquery.triggerQueueCallback https://gerrit.wikimedia.org/r/145391 -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 Gerrit Notification Bot gerritad...@wikimedia.org changed: What|Removed |Added Status|NEW |PATCH_TO_REVIEW -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #10 from Gerrit Notification Bot gerritad...@wikimedia.org --- Change 145393 had a related patch set uploaded by Gilles: Use the new .bindQueueCallback() instead of .bind() https://gerrit.wikimedia.org/r/145393 -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 Gilles Dubuc gdu...@wikimedia.org changed: What|Removed |Added CC||gdu...@wikimedia.org Assignee|wikibugs-l@lists.wikimedia. |gdu...@wikimedia.org |org | -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #8 from Krinkle krinklem...@gmail.com --- (In reply to Tisza Gergő from comment #5) Hard to tell how exactly it should be done without knowing how you track when all plugins are loaded, but probably something along the line of all plugins returning a promise which is used to create a master promise saying all plugins loaded. E.g. var pluginLoadingPromises = []; for ( plugin in this.plugins ) { pluginLoadingPromises.push( plugin.getLoadingPromise() ); } $.when.apply( $.when, pluginLoadingPromises ).then( allPluginsLoadedCallback ); If you end up using $.when, please get it right. $.when.apply( $, promises ); or: $.when.apply( null, promises ); not: $.when.apply( $.when, promises ); Also, I'd recommend attaching to .done() instead of .then() if you don't need *another* deferred to be instantiated with all handlers proxied. Unnecessary overhead. Alternatively, if you have control over the flow, you can chain deferreds instead of queueing them up in an array: $.when( thing1, thing2 ).then( function ( data1, data2 ) { return $.ajax( url, { x: data1.y + data2.z } ); }).then( function ( response ) { return response.success; }).etc. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 Andre Klapper aklap...@wikimedia.org changed: What|Removed |Added Blocks||700 -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #2 from Michael Dale md...@wikimedia.org --- jquery.triggerQueueCallback.js indeed pre-dates promises. It's intent is to trigger all events bidded to a given event name and once all respective events issue the supplied callback, continue code execution. Is it possible to implement an event bind callback list with promises? .. i.e imagine you want to let plugins supply player sources, and multiple such plugins can add to your available sources. Within your get sources you have something like: $(this.embedPlayer).triggerQueueCallback('getSources', function(){ // This callback is called after all plugins issue callback for getSources _this.handleSources(); }); Within plugins that supply sources you presently have: $(this).bind('getSources', function(event, callback){ _this.asyncCallToGetSources(function( sources ){ _this.embedPlayer.addSources( sources ); callback(); }); }); Within triggerQueueCallback, we have the stack of binded getSources, and await each callback before issuing the master callback. Most promise examples I have seen seem to pass a single event callback, is there a clean way that each plugin to not have to know about the rest of the promise chain? -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 Krinkle krinklem...@gmail.com changed: What|Removed |Added CC||krinklem...@gmail.com --- Comment #3 from Krinkle krinklem...@gmail.com --- To maintain a list of functions and fire them in some manner, you can use $.Callbacks. This jQuery is also used internally by jQuery Event, Promise, Deferred and Ajax. http://api.jquery.com/jQuery.Callbacks/ var list = $.Callbacks( /* optional behaviour modifier flags */ ); list.add( fn ); list.fire( /* optional */ data ); -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #4 from Michael Dale md...@wikimedia.org --- right but you still need to wait for all to resolve before continuing. you just described adding a stack of functions to be executed. seems $.Deferreds may work ( at the end of that jQuery.Callbacks doc ) -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #5 from Tisza Gergő gti...@wikimedia.org --- Hard to tell how exactly it should be done without knowing how you track when all plugins are loaded, but probably something along the line of all plugins returning a promise which is used to create a master promise saying all plugins loaded. E.g. var pluginLoadingPromises = []; for ( plugin in this.plugins ) { pluginLoadingPromises.push( plugin.getLoadingPromise() ); } $.when.apply( $.when, pluginLoadingPromises ).then( allPluginsLoadedCallback ); -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #6 from Michael Dale md...@wikimedia.org --- there is no master for-loop other then the triggered event ... i.e the core get sources implementation should not have to know what plugins are choosing to add at event trigger time. But $.when looks helpful. i.e: we trigger each plugin adds to the array its promise, then once all promises are resolved we continue execution now that all plugins have had an async opportunity to add their sources. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #7 from Tisza Gergő gti...@wikimedia.org --- If you have some sort of plugin registry (i.e. you know the full list of plugins, even if you don't know which plugins will act on this event), you can do a for loop over it, and plugins which pass can just return a resolved promise ( $.Deferred().resolve() ). But there are many possible ways to do this, depending on various details (e.g. what do you want to happen if some plugins fail to load but others succeed). Generally you want every plugin to return a promise which will resolve when it finishes loading, and want to have some helper function/class which collects all those promises and returns a master promise. If you can get all the plugin promises at the start and are OK with failing the whole process of any of the plugins fail, then $.when is a convenient way of doing that; otherwise you will have to create a deferred, and manually handle plugin loading status and resolve the deferred when all is loaded. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 65428] Fix JQMIGRATE: Use of jQuery.fn.data('events') is deprecated in TimedMediaHandler
https://bugzilla.wikimedia.org/show_bug.cgi?id=65428 --- Comment #1 from Tisza Gergő gti...@wikimedia.org --- MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery/jquery.triggerQueueCallback.js On the first glance it looks like someone was trying to reinvent promises. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l