backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Update jQuery UI to 1.14 #6677

Closed indigoxela closed 1 month ago

indigoxela commented 2 months ago

jQuery UI 1.14.0 has arrived! https://blog.jqueryui.com/2024/08/jquery-ui-1-14-0-released/

This contains (slightly?) breaking changes, for example they dropped IE support and removed related polyfills. OK, as we did already in Backdrop. The structure seems to have changed, but it's not clear, yet, if that affects us in any way. Edit: it doesn't.

They also dropped support for very old jQuery versions and removed related workarounds.

There's an upgrade guide, but as we're on jQuery UI 1.13.x already, it might be, we don't have to do much (or anything) re that.

Here's the changelog

Note that we still have a pending update to the latest 1.13, but unlike that one, which is appropriate for a bugfix release, this one here probably isn't. It's rather a candidate for a minor Backdrop release.

List of things to manually test with new versions of jQuery UI:

See: https://github.com/backdrop/backdrop-issues/wiki/jQuery-UI:-Checklist-for-manual-tests

Core

Blocks

Field UI

Layout UI

CKEditor

Elements

Views UI

Weight

indigoxela commented 2 months ago

Hm... seems like the new version breaks our dialog (optimized) resize functionality with both of our jQuery versions. :disappointed: So this needs work at least in core/modules/filter/js/filter.js, eventually more.

But overall it doesn't look that bad. Draggable, droppable and friends seem to work fine.

The error is Uncaught TypeError: $(...).position() is undefined in line 231 of filter js, as at that point $('.editor-dialog') is an empty array.

FTR: Files that got removed from the build (presumably unrelated to above dialog prob):

    deleted:    core/misc/ui/jquery.ui.core.min.js
    deleted:    core/misc/ui/jquery.ui.form.min.js
    deleted:    core/misc/ui/jquery.ui.ie.min.js
    deleted:    core/misc/ui/jquery.ui.safe-active-element.min.js
    deleted:    core/misc/ui/jquery.ui.safe-blur.min.js
indigoxela commented 2 months ago

Oh... oh... it's the deprecated dialogClass, that causes trouble here.

We have an issue for that already, but it's not fixed: https://github.com/backdrop/backdrop-issues/issues/6184

So, let's set the flag back to true for now? Seems to work. Note that dialogClass is also used in contrib (all over the place) and it's even in our official documentation, so even if we fixed it in core, we'd still need the compat flag.

indigoxela commented 1 month ago

A fresh sandbox is available (rebased).

olafgrabienski commented 1 month ago

Thanks for the fresh sandbox!

docwilmot added pr - works for me

Works for me as well.

quicksketch commented 1 month ago

I also tested and things seem to all work. Layout drag and drop doesn't work on touch screens but that seems to be the case before this PR as well (real touch support might not ever make it to jQuery UI). @indigoxela would you be interested in updating Touch Punch too? Looks like there's several new versions since we last updated: https://github.com/RWAP/jquery-ui-touch-punch

quicksketch commented 1 month ago

Merged into 1.x for 1.29.0. Thank you @indigoxela, @olafgrabienski, and @docwilmot!