Keeping the dialog.js clean as discussed in #1667742: Add abstracted dialog to core (resolves accessibility bug).

Files: 
CommentFileSizeAuthor
core-js-dialog-ajax.patch2.89 KBnod_
PASSED: [[SimpleTest]]: [MySQL] 49,242 pass(es).
[ View ]

Comments

nod_’s picture

Status:Active» Needs review
effulgentsia’s picture

Title:Split Dialog API and optional integration helpers into separate files» Split the ajax part of Dialog API into it's own file

Splitting 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?

effulgentsia’s picture

Title:Split the ajax part of Dialog API into it's own file» Split Dialog API and optional integration helpers into separate files
nod_’s picture

Title:Split the ajax part of Dialog API into it's own file» Split Dialog API and optional integration helpers into separate files

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.

dawehner’s picture

Could 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.

jibran’s picture

Issue tags:+modal dialog

Tagging.

quicksketch’s picture

Status:Needs review» Closed (duplicate)