Bring back sorting by weight (determined by the asset file organiztion) + fix...
Bring back sorting by weight (determined by the asset file organiztion) + fix one test (weight attribute is not present anymore in library definition)
Closes #1945262
Merge request reports
Activity
added 2 commits
added 1 commit
- e120880c - form-reset-mixin-min.js needs to come before draggable/resizable.
- Resolved by Stephen Mustgrave
- Resolved by Stephen Mustgrave
This is pretty cool but I have some questions.
- If we're not removing weight, why are their weight tests being removed?
- Why are there so many weight removals without associated before/after changes? Did they just not matter and had arbitrary weights associated with them?
- Is removing weights going to cause a problem for sites/contrib? Even core was targeting weights to ensure load order so its a certainty things outside core are too.
added 123 commits
-
e120880c...c28a1fb6 - 94 commits from branch
project:11.x
- c28a1fb6...5f153e92 - 19 earlier commits
- 32edfef7 - Make sure that minimal representative subset of the given libraries matches new discovery mechanism
- 667f2281 - Before/after are not dependencies, so they must be preserved in the minimal representative subset
- 6e200d93 - update composer.lock from 11.x
- 02328918 - Fix deprecated method call in test.
- 4bcc2809 - Remove form-min.js
- 0faaa049 - Cast to string.
- 3433b729 - Remove safe-active-element.js
- 66635bd0 - form-reset-mixin-min.js needs to come before draggable/resizable.
- 8e277ef6 - Rename the parameter.
- 94fa2c74 - Clean up variable names, remove unnecessary class property.
Toggle commit list-
e120880c...c28a1fb6 - 94 commits from branch
#1. The weight tests removed are quite specific to jquery_ui assets depending on weight for ordering, this has been replaced by ordering files within a library definition in the order they should be loaded.
#2. I only found a few of these but yes. In some cases we had to add correct dependencies, in other cases order files within a library definition in dependency order. Others were either never needed or may have been outdated.
#3. This should be unlikely. Weight is set via a negative number, so:
If file.js was previously set to have a weight of -10 and the weight definition is removed, it will now have a de-facto weight of 0.
If contrib-file.js is set to have a weight of -11 so that it loads before file.js, it will still load before file.js because that's still a lower weight than 0.
Maybe it could go wrong if a file is set be exactly between one file with weight -8 and one file with weight -10 but that seems very, very convoluted.
added 76 commits
-
94fa2c74...79a49040 - 75 commits from branch
project:11.x
- 7387a71c - Merge branch '11.x' of https://git.drupalcode.org/project/drupal into...
-
94fa2c74...79a49040 - 75 commits from branch
added 250 commits
-
67adabcc...563fc19c - 249 commits from branch
project:11.x
- 04d954ef - Merge remote-tracking branch 'origin/11.x' into 1945262-custom-weights-dependencies
-
67adabcc...563fc19c - 249 commits from branch
added 476 commits
-
04d954ef...93ec7a93 - 475 commits from branch
project:11.x
- 999028db - Issue #1945262: Replace custom weights with dependencies in library...
-
04d954ef...93ec7a93 - 475 commits from branch
added 32 commits
-
999028db...228328d2 - 31 commits from branch
project:11.x
- cc0aef7a - Issue #1945262: Replace custom weights with dependencies in library...
-
999028db...228328d2 - 31 commits from branch
added 35 commits
-
cc0aef7a...401a157f - 34 commits from branch
project:11.x
- bd840dba - Issue #1945262: Replace custom weights with dependencies in library...
-
cc0aef7a...401a157f - 34 commits from branch