Skip to content
Snippets Groups Projects

Bring back sorting by weight (determined by the asset file organiztion) + fix...

Open catch requested to merge issue/drupal-1945262:1945262-custom-weights-dependencies into 11.x
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • This is pretty cool but I have some questions.

    1. If we're not removing weight, why are their weight tests being removed?
    2. Why are there so many weight removals without associated before/after changes? Did they just not matter and had arbitrary weights associated with them?
    3. 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.
  • catch added 123 commits

    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.

    Compare with previous version

  • Author Maintainer

    #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.

  • Roman Paska added 76 commits

    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...

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Stephen Mustgrave resolved all threads

    resolved all threads

  • Roman Paska added 250 commits

    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

    Compare with previous version

  • Liam Morland added 476 commits

    added 476 commits

    Compare with previous version

  • Liam Morland added 32 commits

    added 32 commits

    Compare with previous version

  • Liam Morland added 35 commits

    added 35 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading