Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293403

Replace jQuery UI sortable with Sortable js

$
0
0

Problem/Motivation

We are in the process of deprecating jQuery UI in core. The jQueryUI sortable library is among the components that need to be removed/replaced.
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

3 of Drupal core's modules currently depend on jquery.ui.sortable

  • ckeditor
  • layout_builder
  • media_library

Proposed resolution

  • Sortable https://github.com/SortableJS/Sortable was chosen because it seems popular (in terms of github stars and forks), is actively maintained (looking at recent issue fixes and releases), and the comparison video looks impressive.
  • Switch ckeditor, media_library, and layout_builder to use the replacement library.
  • Deprecate jquery.ui.sortable (e.g., emit a deprecation notice for modules/themes that depend on it).
  • Deprecate jquery.ui.touch-punch which is only used by jquery.ui.sortable in media_library.
SortableJS/Sortable

Remaining tasks

  1. Decide on the replacement library.
  2. Patch the affected core modules (ckeditor, media_library, layout_builder)
  3. Validate the prototype with JS maintainers
  4. Finish patch
  5. Accessibility and usability review

User interface changes

API changes

  • Sortable has a different JS API than jquery.ui.sortable. We still need to decide whether we need to provide a bridge/façade, or whether it's ok to require contrib modules to change their JS code to the new API.
  • A contrib module providing the jquery.ui.sortable asset library could also be created

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293403

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>