Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of THREESCALE-9982: Unify jquery across 3scale.
layout/provider.js imports a lot of old scripts and libraries that (some) depend on jquery:
By moving them into webpack we gain typings and have more control over its use of jquery, therefore making it easier to upgrade.
Verification instructions
ajax_events
: adds/removes a spinner to the screen when ajax is used (asynchronous requests via JS). These events are triggered by window.$ (that is, jquery v1) so it's necessary to set event handlers to jquery 1. Ajax is used by jquery-rails, rails_ujs and other similar libraries that are managed by bundler. These libraries are all plugged into window.$.remote
: this one is very important. The script sets up all remote forms and links (with class .remote) that are to send an ajax request to rails and receive a JS response, instead of loading the whole page again. This should be easy to test, look for forms and links with class remote (or prop remote: true) and verify that using then do not reload the page.