We now have an official API for displaying stuff in popups.
It would be over-nifty to display batch progress bars in a modal while keeping the page that triggered the batch in the background.
Challenges:
- It has to be progressive enhancement, of course (no JS = separate progress page, as currently)
- Batch API doesn't support canceling an ongoing batch, so the modal shouldn't have a "close" button
- The progress messages displayed by some existing batches right now can be longish, and can add new lines as the operations progress (e.g. simpletest, one line per test class that ran), meaning "maximum width" and "varying height"
- Not sure how to integrate with batches triggered by standalone scripts like install.php, update.php, that currently take care of displating the progress page themselves.
Any takers ?
Comments
Comment #1
yched commentedadding a couple tags
Comment #2
nod_I'm not quite sure about that. What happens when people try to navigate away by clicking on some link on the underlying page?
Comment #3
yched commentedSure, they can't be allowed to click away - but we do have modals, right ?
Comment #4
yched commentedAlso, the advantage of a modal over the current standalone themed page would be that, specifically, users *can* currently click away through the toolbar, site logo, footer blocks...
Comment #5
Bojhan commentedWhere are you proposing we add this?
Comment #6
yched commented@Bojhan: well, I guess on any form that submits to a batch ?
A couple examples in core are:
- "Modules admin" submit if locale is enabled and site has more than one language (download and import of .po files)
- "Content admin" page, if submitting an operation (delete, publish...) on more than 10 nodes
- (for devs) Simpletest run page
- User account cancellation
- Rebuilding node access permissions
+ the standalone scripts, that are technically slightly different:
- install.php
- update.php
Not sure if the "modal" behavior should be hardcoded or optional (and whether opt-in or opt-out). But I don't think I see why a specific form that currently submits through a batch would want to avoid running its progress in a modal.
Comment #6.0
yched commentedmore specific
Comment #15
nod_Do we still want that?