Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Keeping the dialog.js clean as discussed in #1667742: Add abstracted dialog to core (resolves accessibility bug).
Comment | File | Size | Author |
---|---|---|---|
core-js-dialog-ajax.patch | 2.89 KB | nod_ | |
Comments
Comment #1
nod_Comment #2
effulgentsia CreditAttribution: effulgentsia commentedSplitting into a separate file is a great idea, but I don't like naming that second file 'dialog.ajax.js'. It has nothing to do with AJAX, regardless of whether we mean AJAX narrowly (Drupal's AJAX command architecture) or broadly (any JavaScript that requests something from the server). It's possible for Drupal modules to want to use #drupal-modal or .dialog-cancel links for dialogs that require no content fetching from the server at all.
How about renaming dialog.js to dialog.api.js and having the new file be dialog.js?
Comment #3
effulgentsia CreditAttribution: effulgentsia commentedComment #4
nod_will probably close this one for #1851414: Convert Views to use the abstracted dialog modal where we can split things up. But agreed, dialog.ajax.js was a pretty bad naming in this case.
Comment #5
dawehnerCould it be that the dialog itself is sort of idenpedent to drupal, so what about dialog.drupal.js and dialog.js,
but sure names aren't the most important thing. Way more important is that it's easy to use, so we don't end up with so many implementations in contrib/custom code again.
Comment #6
jibranTagging.
Comment #7
quicksketchThis was split out already as part of #1870764: Add an ajax command which makes it easy to use the dialog API in complex cases.