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

Add a native dialog element to deprecate the jQuery UI dialog

$
0
0

Problem/Motivation

We are in the process of deprecating jQuery UI in core. jQueryUI dialog 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

This issue was originally proposed as specifically looking for a polyfill, with the following explanation:

dialog.js always aimed at using the HTML5 dialog spec. Chrome just added experimental support for dialogs in it's dev branch: http://demo.agektmr.com/dialog/

As time has moved on, it looks like a polyfill is not necessary.

We should let chrome use native dialogs when needed, it actually solves a bunch of messy issues, two of which are:
#2072037: Drupal dialog modal background z-index is set too low to reliably occlude core UI components
#1836392: In the Views UI, the interaction pattern of “All displays”/ “Override this display” is confusing

The problems mentioned above should absolutely be considered wile investigating what to use in place of jQueryUI dialog, but the options should be expanded to include different libraries - whatever option can best facilitate removing jQuery UI.

Proposed resolution

Add a native dialog element to the render API.
Add Umami/Claro/Olivero theme support
Convert existing core usages of jQuery UI dialog to use the native dialog.
Deprecate the jQuery UI dialog for removal in Drupal 11 or 12.

Remaining tasks

List of libraries assessed prior to the decision to use native dialogs:

If we are fortunate enough to find multiple libraries that meet these requirements, they should be compared using criteria such as: Code Style, Maturity, Responsiveness, Accessibility, UX, UI, Modularity, etc.

Libraries reviewed so far:

.

Libraries to review

Implement the library

Add additional tests for important dialog use cases that aren't part of existing coverage. Before doing this review Layout Builder's test coverage as it indirectly tests a wide variety of Dialog use cases.

User interface changes

Yes, TBD.

API changes

TBD.

Data model changes

Release notes snippet

Attached is the patched used to make the following work (minus the scrolling element, that's hardcoded CSS).

What needs to be done is making sure our API can handle native dialogs when available and that pretty much means we need to not use jQuery UI or in a very different way than today to avoid wildly different UX between native and polyfill.


Viewing all articles
Browse latest Browse all 300130

Latest Images

Trending Articles



Latest Images

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