When you delete multiple items, you will get a confirmation message in Pulse (confirming that the long-running "delete" action has completed successfully) and an "info" banner (announcing this new Pulse message) for every single node you attempt to delete. This is both disturbing and time consuming to acknowledge.
Example: Delete a config tree of 50 nodes. You get 50 banners laid over each other at the bottom of AdminCentral and 50 messages in Pulse.
We should show fewer message banners and Pulse messages when batch-deleting items.
What we want is to aggregate multiple messages into a single one. When aggregating messages, we have to both provide an overview of a series of messages and at the same time make sure users don't miss anything important or extraordinary. It's not enough to just show a single message that stands in for dozens of messages, especially when these messages are of a different type.
A typical design pattern to solve such a problem is:
- We aggregate messages over a fixed period of time (e.g. all messages that arrive within 10 seconds).
- We also only aggregate messages of the same type.
- We show an aggregating message as soon time is up OR a message of a different type arrives (i.e. a message of a type, which is different from the type of messages aggregated so far).
Typically, confirmations and info messages are treated differently than warnings and errors. While the former are aggregated as described above, (severe) errors are still displayed one by one in order to be able to show the problem in detail. I thus suggest we start by only aggregating delete "info" (confirmation) messages, but continue to show all warnings and errors using one message for each.
A user attempts to delete 19 items in the Configuration app. Magnolia detects that the deletion will take some time and sends the action to the background.
- After some time, you get 19 messages in Pulse informing you that the long-running "delete" actions has completed successfully. See 2 Dozens of messages and banners.png.
- This also results in 19 "info" message banners showing up at the bottom informing you of the same. These banners have to be closed individually. See 1 Info banner confirming deletion.png.
Instead, we should get:
- A single Pulse message informing you that the "Delete" finished successfully for 19 items.
- This will result in only one "info" message banner being shown as well.
A user attempts to publish 25 items at once in a content app. The action is again sent to the background. Of these 25 publications, let's assume that 19 work fine, 4 raise a warning, 2 fail due to a severe error.
Here's what we could get in such a case. I'm assuming that the aggregation time period is 5 seconds:
- After 5 seconds:
- we get 1 message informing us that 11 items were published successfully.
- After 2 seconds:
- we get 1 message informing us that 2 items were published successfully.
- we get 2 warnings that two items published successfully, but with a warning.
- After 5 seconds:
- we get 1 message informing us that the remaining 6 items were published successfully.
- we get 2 errors that two items failed to get published.
- we get 2 warnings that two other items were published successfully, but with a warning.
We thus get a total of 9 Pulse messages and message banners:
- 3 "info" (confirming the publication of 11, 2 and 6 items)
- 4 "warning" (one for each publication that ended with a warning)
- 2 "error" (one for each failed publication)