New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated synchronous XHR requests rewritten to async #8242
Conversation
widgetsHelper.getAvailableWidgets = function () { | ||
widgetsHelper.getAvailableWidgets = function (callback) { | ||
if(!callback) { // @deprecated | ||
return this.getAvailableWidgetsSync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon we don't have to be backwards compatible here, it's not really a public API or so unless some of our code still uses it
@@ -74,6 +74,7 @@ function ajaxHelper() { | |||
/** | |||
* Should ajax request be asynchronous | |||
* @type {Boolean} | |||
* @deprecated Synchronous XHR requests are deprecated(see http://xhr.spec.whatwg.org) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely mention this in https://github.com/piwik/piwik/blob/master/CHANGELOG.md under "Deprecations". We should also mention that we will remove it in Piwik 3.0. I created follow up issue #8246
I tested them seems to work apart from one, nice!
I have a few comments but they are not necessarily related to this PR, I'm not sure. We could create a follow up issue for this. Same of those issues might have existed before.
I noticed some more problems but they seem not related to this change: #8245 #8246 #8247 |
It's nice to have everything async! |
Sweet. Did you have a look re removing a dashboard? Does that work for you? |
Sorry I meant removing an actual dashboard. This can be done in the "Dashboard & Widgets" selector in the bottom left. |
I've created new dashboard, and removed, and it works http://i.imgur.com/y9Hs1RF.gif |
For some reason it works for me too now. Cannot reproduce it anymore... Good to merge after 2.14.0 release |
Actually the Dashboard UI tests are failing, maybe because of this change? |
I've restarted the build to check this can be reproduced. If the tests still fail then it's an issue either with the UI tests, or the PR? |
I don't undestand how to see/reproduce UI tests failure. I see links in UI tests results:
But it does not works. |
@barbushin it looks like our screenshot uploader / UI test viewer is buggy for pull requests done in branches outside of Piwik/piwik (it works fine for PR done by core team members). To workaround, could you try to re-create PR on the piwik/piwik branch and then maybe it works then? Btw are you able to run UI tests locally and reproduce the UI test failure locally? |
FYI I created https://github.com/piwik/ui-tests-viewer/issues/11 It should be good to merge but can't see why tests fail. Should ideally only merge when tests are green. |
@mattab I re-created PR from |
Duplicate of #8381 |
Fixes #8020
It's the same as #8205 but excluding changes in
/tests/javascript/index.php
and fixedwidgetMenu.js
.