adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
852 stars 74 forks source link

Get rid of synchronization.debounce and use _.debounce instead #3641

Closed baaygun closed 8 years ago

baaygun commented 8 years ago

After realizing that in Mar 19, 2015, we got rid of the async waiting nature of our own debounce function, and it's identical to _.debounce, this cleans it up so we use lodash.

Addresses #3639, @iwehrman please review. @mcilroyc it would be nice to have your eyes on this, as well.

mcilroyc commented 8 years ago

I've never believed that using debounce with a wait of zero was a reasonable thing to do ... or least that it is never what we want to do in design space. Now may be as good a time as any to argue about this. There's only a couple of places that still provide no explicit wait value (thus defaulting to zero).

mcilroyc commented 8 years ago

I suppose I forgot to mention: this all looks correct to me as a direct refactoring. I guess we never used the "immediate" feature which would have been equivalent to the the "leading" lodash option. Just saying that out loud.

baaygun commented 8 years ago

@mcilroyc @iwehrman Thank you for reviews. I've cleaned up the actions code so we no longer have debounced suffix, and also the untimed debounce call for artboard Transform handler.

iwehrman commented 8 years ago

LGTM, thanks!