mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-11 23:36:07 +00:00
9114981380
Functional changes - Show the default / error preview for all extract request failures except those due to network circumstances (such as CORS) or no connectivity (offline). Previously, the error preview was displayed only for missing pages. - FETCH_COMPLETE was previously only dispatched after FETCH_END. Now it's also dispatched after FETCH_FAILED. The additional "fetch complete" is not expected to impact logging. The states of success are: START, END, COMPLETE. The new failure states are consistent with success: START, FAILED, COMPLETE. Testing Errors may be stimulated in a number of ways including: - Timeout: add a timeout field to RESTBaseGateway / MediaWikiGateway.fetch(). http://api.jquery.com/jquery.ajax/ - Bad request: change MediaWikiGateway.fetch's action field to `Math.random() > 0.5 ? 'query' : 'fail'` and RESTBaseGateway.fetch's url field to `RESTBASE_ENDPOINT + ( Math.random() > 0.5 ? encodeURIComponent( title ) : '%%%' )`. - Desired Gateway can be configured in Gateway#createGateway(). - Note: T184534 describes a circumstance where cached previews may not appear when offline. Disable browser caching to avoid confusion. Bug: T183151 Bug: T184534 Change-Id: I7332284da0e0fb1ecd234a6f1e146ebd9ad8d81f |
||
---|---|---|
.. | ||
index.js | ||
index.js.json |