Confirmation prompts for deleting resources
Overview
When a user chooses to delete a resource, they are often provided with a confirmation modal that conveys the severity of the action and communicates consequences of the action. The following examples show different types of confirmation modals provided for the managed Kafka service the Hybrid Cloud Console, as well as an overview of research and guidelines that inform the design for these examples.
UX research findings
During usability testing of the Delete Kafka and topic flows, we learned:
- Users prefer typing the name of the thing they’re deleting instead of generic “DELETE” text
- Users want extra warning details about the consequences of the action
- Users had difficulty understanding what they’re deleting (were they deleting a Kafka instance or a Kafka topic?)
To address these issues, the following design patterns were adopted in the Delete confirmation modals:
- Interaction:
- For the extra destructive Delete actions, the user must type the name of the resource they’re deleting
- Microcopy:
- The name of the resource and the type of resource should be included in the same body of text
- The primary message should provide additional details about the consequences of the action
- Visual design:
- The primary message should be visually prominent
Types of confirmation modals
There are 3 different types of confirmation modals noted in the next section:
- Extra destructive - includes:
- a warning icon
- input for extra confirmation
- red delete button
- Destructive - includes:
- a warning icon
- red delete button
- Easily recoverable - includes:
- no icon
- blue delete button
These types are based on the confirmation dialog guidelines provided by PatternFly.
Examples
Delete Kafka instance
Type: extra destructive
When the modal first opens, the Delete button is disabled and the user is prompted to type the name of the resource to confirm deletion.
As the user types a value in the text input, the input displays a warning icon.
Once the text input has the expected value, the Delete button becomes enabled and the warning icon changes to a success icon.
Delete topic when no active consumers
Type: extra destructive
The same behavior described for Delete Kafka instance above applies to this modal as well.
Delete topic when 1 or more active consumers
Type: extra destructive
The same behavior described for Delete Kafka instance above applies to this modal as well.
Delete consumer group
Type: easily recoverable
A consumer group is a set of consumers, usually from the same application, which consume data from Kafka topics. A consumer group is not explicitly created, but consumers can be assigned to a specific consumer group.
A consumer group can only be deleted if it has no active members. This is an easily recoverable action because if a group is deleted from a Kafka cluster, and a consumer that is assigned to the consumer group becomes active again, then the consumer group will reappear in the Kafka cluster.
It's possible that a user might try to delete a consumer group that still has active consumers, which prevents the user from being able to delete the consumer group. When this happens, the same Delete confirmation modal displays, but instead of the regular message, an inline error alert displays explaining why the consumer group cannot be deleted.
Additional examples related to consumer groups are available at https://www.uxd-hub.com/entries/entry/kafka-consumer-groups