[meta] Update rules_ui.listing.js

Created on 9 March 2023, over 1 year ago

rules_ui.listing.js was forked from the core views_ui.listing.js in early 2019. The code in views_ui.listing.js had been stable with no changes for two years before that time.

Since then, there have been 9 commits to views_ui.listing.js (although one is a revert of another one, so actually only 7 real commits). The most important of these for our purpose is the removal of jQuery.once, because it is that change which makes rules_ui.listing.js incompatible with Drupal 10. But the other 6 commits are also worth looking at because the core JavaScript has enforced new JavaScript coding standards and some other minor improvements.

Because rules_ui.listing.js is a fork, we should ensure that we side-port any improvements made by core and keep our version up-to-date.

The core commits, in order of date (oldest first) are listed as related issues.

I will use this issue to port each of those core commits to Rules, as necessary.

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Rules Core

Created by

πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @TR
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    You know, actually there were a number of reverts, additions then deletions, etc. across those commits, so I'm just going to squash the commits and re-roll the patch to apply to rules_ui.listing.js.

    In the core repository the command I used to see the changes to views_ui.listing.js was:
    git diff 5b657b15b810 views_ui.listing.js
    Where 5b657b15b810 is the commit before #3101543: Update core JavaScript dependencies listed in package.json β†’ .
    That yields the following patch, which I uploaded here as 3346889-update-views-ui-listing-js.txt (named as a .txt file because it applies to core, not to rules).

    I re-rolled it to be the following for rules: 3346889-update-rules-ui-listing-js.patch

    The differences between the two are shown in diffs.txt. You will see that aside from changing some CSS selectors to use the word "rules" instead of "views", the only changes are comments.

    Also, because we're changing JavaScript dependencies, we need to worry about changing rules.libraries.yml
    As with the above, git diff 5b657b15b810 views_ui.libraries.yml shows that the only relevant change was to change jquery/once to core/once.

    So included in 3346889-update-rules-ui-listing-js.patch I have added these same changes to rules.libraries.yml.

  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    Well, as is usual when copying core code, there are some JavaScript coding standard violations in there. I am not going to clean those up because I want to keep rules_ui.listing.js as close as possible to the core views_ui.listing.js in order to make it easier to maintain.

    But I am going to add some text at the top in the file comments that explains where rules_ui.listing.js was forked from and which core commit it is current with. That way it will be easier to update in the future if necessary.

    • TR β†’ committed 7a30f552 on 8.x-3.x
      Issue #3346889 by TR: [meta] Update rules_ui.listing.js
      
  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    This fixed the one test fail due to jquery.once, and didn't cause any further failures. This fix is required for continued D10 compatibility. I manually tested it and it works.
    Committed.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024