By zrpnr on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.8.x
Introduced in version:
8.8.0
Issue links:
Description:
The jQuery UI asset libraries not in use by Drupal core have been marked deprecated and will be removed from core in Drupal 9.
- Since jQuery UI itself is no longer actively supported, it is recommended to find an alternative for the longer term.
- For a simple upgrade path to Drupal 9, any modules or themes that depend on these deprecated asset libraries can use the provided contributed projects that provide replacements (see below).
- Note that two libraries have replacements in core:
Example Usage — module
To replace the core/jquery.ui.accordion asset library in a module:
- Download and install the jQuery UI Accordion module.
- Add a dependency to the module's
info.ymlfile.
dependencies: - jquery_ui_accordion:jquery_ui_accordion - Change any reference for
core/jquery.ui.accordiontojquery_ui_accordion/accordion
Example Usage — theme
To replace the core/jquery.ui.accordion asset library override or extension in a theme:
- Download the jQuery UI Accordion module.
- Also check if there's a
libraries-extendentry for this asset library:
libraries-extend: core/jquery.ui.accordion: - mytheme/mytheme.jquery.ui.accordion - Copy/paste this, and change
core/jquery.ui.accordiontojquery_ui_accordion/accordion, like so:
libraries-extend: jquery_ui_accordion/accordion - mytheme/mytheme.jquery.ui.accordion - Also check if there's a
libraries-overrideentry for this asset library:
libraries-override: core/jquery.ui.accordion: css: theme: assets/vendor/jquery.ui/themes/base/accordion.css: false - Copy/paste this, and change
core/jquery.ui.accordiontojquery_ui_accordion/accordionand look up in the downloaded contrib module's*.libraries.ymlfile what the updated path is, like so:
libraries-override: jquery_ui_accordion/accordion: css: theme: jquery.ui/themes/base/accordion.css: false - Only the installed asset libraries (the core or contrib one, or both in a transitional phase) will be overridden or extended!
Themes can now add an explicit dependency on modules in both Drupal 9 and Drupal 8.9 (in Drupal 8.9, the dependency will be ignored).
https://www.drupal.org/node/2937955
(The same pattern applies to all of the jQuery UI asset libraries listed below.)
Contributed Projects
| Deprecated core asset library | Replacement contributed module |
|---|---|
Any of:
|
jQuery UI |
core/jquery.ui.accordion |
jQuery UI Accordion |
core/jquery.ui.autocomplete |
jQuery UI Autocomplete |
core/jquery.ui.button |
jQuery UI Button |
core/jquery.ui.checkboxradio |
jQuery UI Checkboxradio |
core/jquery.ui.controlgroup |
jQuery UI Controlgroup |
core/jquery.ui.draggable |
jQuery UI Draggable |
core/jquery.ui.droppable |
jQuery UI Droppable |
Any of:
|
jQuery UI Effects |
core/jquery.ui.menu |
jQuery UI Menu |
core/jquery.ui.progressbar |
jQuery UI Progressbar |
core/jquery.ui.resizable |
jQuery UI Resizable |
core/jquery.ui.selectable |
jQuery UI Selectable |
core/jquery.ui.selectmenu |
jQuery UI Selectmenu |
core/jquery.ui.slider |
jQuery UI Slider |
core/jquery.ui.spinner |
jQuery UI Spinner |
core/jquery.ui.tabs |
jQuery UI Tabs |
core/jquery.ui.tooltip |
jQuery UI Tooltip |
Impacts:
Site builders, administrators, editors
Module developers
Themers
Site templates, recipes and distribution developers
Comments
This has been updated for Drupal 9 Compatability... No?
See https://www.drupal.org/project/jquery_ui_accordion/releases/8.x-1.1
jQuery UI TouchPunch
Here's another one to add to the list:
Deprecated core asset library:
core/jquery.ui.touch-punchReplacement contributed module: jQuery UI TouchPunch
Two more to add
These two still exist in core (
core.libraries.yml) but are deprecated (deprecated: *jquery_ui_unused_deprecated)Deprecated core asset library:
core/jquery.ui.dialogReplacement contributed module: jQuery UI Dialog
Deprecated core asset library:
core/jquery.ui.menuReplacement contributed module: jQuery UI Menu
Replacement?
So they've removed this library because it is "no longer supported" (though jquery ui has just been put into maintenance only mode, where it will be stable, and receive bug-fix and security patches. That doesn't seem like a reason not to use it to me). This change record suggests finding an alternative, but there aren't any clear alternatives that I can find provided as a contrib module library. And jQuery UI is still the first result in searching for "javascript accordion library." Then this provides instructions to use the contrib version of jquery ui (which I'm not supposed to use). Apologies for the snark, this particular issue has just been an annoying challenge as I've been upgrading my projects to Drupal 9.
So I guess the question is, what is a suitable accordion library for jQuery UI?
We also have this inside the
We also have this inside the https://www.drupal.org/project/jquery_ui_menu. A tight spot :)
any replacement?
have anyone found any js replacement?
How can I override the core/jquery.ui css file?
I aleardy install a new jQuery UI contributed module but I still don't know how to override a
theme.cssfile from that module to my custom css file. Thanks.This is the library code from jQuery UI module:
This is the info file code of my custom theme:
Did you finally manage to
Did you finally manage to exclude styles from jquery.ui via "libraries-override"? Initially it was possible to exclude them by using the "stylesheets-remove" key, but since it has been deprecated I have the same problem.