Problem/Motivation

jQueryUI is going to be deprecated
jquery.ui.draggable is among the components that need to be addressed
As mentioned in the parent issue: #3067261: [Plan] Remove jQuery UI components used by Drupal core and replace with a set of supported solutions
The OpenJS Foundation lists jQuery UI as an Emeritus project in https://openjsf.org/projects/ which is described as:

Emeritus projects are those which the maintainers feel have reached or are nearing end-of-life

Proposed resolution

When #2158943: PP-1 Add a native dialog element using HTMX to deprecate the jQuery UI dialog and #3064049: Replace jQuery UI sortable with Sortable js (which removes CKEditor's dependency on draggable) are committed, deprecate the jquery.ui.draggable library.
No replacement will be necessary as the two issues above remove all uses of jquery.ui.draggable from core.

Remaining tasks

Wait for #2158943: PP-1 Add a native dialog element using HTMX to deprecate the jQuery UI dialog and #3064049: Replace jQuery UI sortable with Sortable js to be completed, then change the issue status to Active (or any other flavor of not-postponed)
Deprecate the jquery.ui.draggable library.

User interface changes

no

API changes

...

Data model changes

N/A

Release notes snippet

...

Comments

bnjmnm created an issue. See original summary.

catch’s picture

Issue tags: +Drupal 9
xjm’s picture

Why is this issue postponed on the sortable issue? In core.libraries.yml, dialog depends on draggable, but sortable has no dependency on draggable. Is it another missing dependency we should add, or is there another reason it's postponed on sortable as well?

I'd say at this point it's fairly likely we will be developing this issue against D9 soon, especially since there's a lot of risk with the Dialog replacement so Dialog is likely to continue in D9 development as well. (9.0.x opens October 14.)

bnjmnm’s picture

Re #3

Why is this issue postponed on the sortable issue?

CKEditor currently has a dependency on draggable, which will be removed in #3064049: Replace jQuery UI sortable with Sortable js.

bnjmnm’s picture

Issue summary: View changes

Updated IS to explain why this is postponed on #3064049: Replace jQuery UI sortable with Sortable js

xjm’s picture

What about the other uses of draggable? Do we need to do further work on tabledrag after #3064049: Replace jQuery UI sortable with Sortable js?

xjm’s picture

@bnjmnm confirmed that tabledrag does not actually use draggable. #3064049: Replace jQuery UI sortable with Sortable js proves this (edit: I guess because no HEAD test coverage fails?)

xjm’s picture

I belatedly realized that core tabledrag predates jQuery UI in core by, like, a lot, so it would not have depended on jquery.ui.draggable unless refactored.

Core library definition:

drupal.tabledrag:
  version: VERSION
  js:
    misc/tabledrag.js: { weight: -1 }
  dependencies:
    - core/jquery
    - core/drupal
    - core/drupalSettings
    - core/jquery.once
    - core/jquery.cookie

(Caveat: we have had missing library dependencies, but in this case it seems unlikely.)

So I guess this can be closed as a duplicate if/when the other issue is committed, and the library added then to the list of those we deprecate.

wim leers’s picture

Title: Deprecate jquery.ui.draggable » [PP-2] Deprecate jquery.ui.draggable

#8++ … except for the last paragraph. core/jquery.ui.dialog still depends on core/jquery.ui.draggable, so even after #3064049: Replace jQuery UI sortable with Sortable js lands, we'll still need to have #2158943: PP-1 Add a native dialog element using HTMX to deprecate the jQuery UI dialog land before we can do this. Unless you mean #2158943 can deprecate both core/jquery.ui.dialog and core/jquery.ui.draggable?

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

amateescu’s picture

Title: [PP-2] Deprecate jquery.ui.draggable » [PP-1] Deprecate jquery.ui.draggable
Issue tags: -JavaScript +JavaScript

One of the blockers is in.

catch’s picture

Title: [PP-1] Deprecate jquery.ui.draggable » Deprecate jquery.ui.draggable
Status: Postponed » Active

I found a way to deprecate this now, see #3113400: Deprecate more jQuery UI library definitions. Unpostponing although we may want to merge into that issue.

catch’s picture

Status: Active » Closed (duplicate)