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
- Code quality: documented, comprehensive tests
- Maintainership of the package: recent releases (latest release was in 26 Jun 2019)
- https://github.com/SortableJS/Sortable/releases
- 119 contributors https://github.com/SortableJS/Sortable/graphs/contributors
- License: MIT
- Security policies of the package: Not formally documented. The maintainer prefers a private email about any security issues with the package and is comfortable following coordinated disclosure with us. https://github.com/SortableJS/Sortable/issues/1614
- Expected release and support cycles: undocumented; sporadic releases, asked in https://github.com/SortableJS/Sortable/issues/1614. Maintainer is confident an updated minor version will be released before Drupal 8.8. The maintainer also intends a future 2.x major version, and will continue to support 1.x after it is released.
- Other dependencies it'd add, if any: none
Remaining tasks
Decide on the replacement library.Patch the affected core modules (ckeditor, media_library, layout_builder)- Validate the prototype with JS maintainers
- Finish patch
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