Problem/Motivation

In #3051352: [Plan] Remove unused jQuery UI components and replace with a suite of contrib packages for the continuous upgrade path we deprecated jQuery UI components that core doesn't use.

However, we still need to remove the library definitions from Drupal core.

Some core libraries are still using jquery_ui components directly, like dialog - in these cases, we can't remove the actual files, but we can still remove the library definitions.

We can do this all in one go in this issue I think - should be pure deletion.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3277744

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

Issue summary: View changes

Taran2L made their first commit to this issue’s fork.

xjm’s picture

Issue tags: +beta blocker, +Drupal 10
taran2l’s picture

Okay, seems like everything can be deleted except autocomplete, which has own issue #3076171: Provide a new library to replace jQuery UI autocomplete

But, that issue feels like a lot of work and then there is a question: is there enough of time to replace autocomplete and then remove everything else for D10 beta ?

taran2l’s picture

... I was wrong, also dialog #2158943: Add a native dialog element to deprecate the jQuery UI dialog and from that issue by @xjm:

Since that means we will not be removing jQuery as a dependency of Drupal 10, and since the Dialog replacement is also likely to cause disruptions that will require a longer testing period, I'm moving this issue to the same meta.

catch’s picture

@Taran2L - both of those core libraries don't actually depend on the jquery_ui library definitions any more, but on the files directly, so we can still remove the library definitions themselves.

taran2l’s picture

@catch, right. But, jQuery UI code will remain in core (so will be supported) and at the same time contrib must rely on myriad of modules (that require support as well) making everything just much more complicated for the ecosystem. Maybe, maybe, we should undeprecate jQuery UI or remove it in D11 ?

nod_’s picture

The hardship is a feature, not a bug. We're not trying to get contrib to keep using jQuery UI. It's still possible because we don't want to break everyone's code, so there is a way to keep using it for D10+. If it's important enough people might also step up to maintain those projects, because right now they're minimally maintained.

It's not supported in the sense that no one else in contrib should be using those files in their module/theme/project. Also it's not all of the jQuery UI files, some are going to be removed so we won't have the complete source of jQuery UI in core.

And maybe (that's what I hope at least) if someone in contrib has a better idea on what to use instead, they can propose it for core so that all of contrib can use that better version of the thing. It can't always be from core to contrib, if we want to have frontend folks contribute, we need more interesting frontend topics to contribute to :)

andypost’s picture

Status: Active » Needs review
andypost’s picture

Issue tags: +Deprecation Removal
nod_’s picture

Status: Needs review » Needs work

I think there are a few files we don't need anymore. They should be removed from the source and from the core/scripts/js/vendor-update.js file.

taran2l’s picture

We are missing one more thing here, core/tabbable.jquery.shim library must be removed as well.

The :tabbable selector is deprecated in Drupal 9.2.0 and will be removed in Drupal 10.0.0. Use the core/tabbable library instead. See #3183730: jQuery :tabbable selector deprecated

I think this requires a separate issue, as both core/drupal.autocomplete and core/drupal.dialog libraries depend on it

taran2l’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Reviewed & tested by the community

MR looks great, can't think of anything else to do here.

Opened a follow-up for tabbable, good spot: #3278625: Deprecate/remove jquery.tabbable.shim.

nod_’s picture

looks good to me to! thanks

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f0f493c and pushed to 10.0.x. Thanks!

I thought about a CR here but I think we just need to attach the existing CRs - going to do that now.

  • alexpott committed f0f493c on 10.0.x
    Issue #3277744 by Taran2L, catch, nod_: Actually remove deprecated...

Status: Fixed » Closed (fixed)

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

quietone’s picture

Issue tags: +Drupal 10 beta blocker
joseph.olstad’s picture

dust hasn't settled in contrib related to this change Might be holding onto D9 for a while longer than anticipated.