← Back to Catalog

Prefer undo or popconfirm over modal

prefer-undo-or-popconfirm-over-modal

Prefer undo (or Popconfirm) over Modal double-confirm — delete → success + Undo (message+undo gone after one minute or on Undo). If undo is invalid, use Popconfirm next to the control. Abusing Modal drops context and blocks undo. Dual-cite Primer "never warning when you mean undo" / NN/g undo; Ant names Popconfirm vs Modal.

Description

Ant prefers undo (or Popconfirm) over a blocking Modal double-confirm. Delete should surface success with Undo (message and undo gone after one minute or on Undo); when undo is invalid, place Popconfirm next to the control. Abusing Modal drops context and blocks undo. Dual-cite Primer/NN/g undo guidance; Ant names Popconfirm versus Modal. Fail Modal double-confirm where undo is valid, or delete with neither undo nor Popconfirm.

When to use

Protecting a delete or similar reversible destructive action.

Not when

Irreversible high-stakes commits where undo is truly invalid by design.

Agent hint

After delete, offer success plus Undo, or Popconfirm beside the control.

Pass

Delete uses success + Undo (gone after one minute or on Undo), or Popconfirm next to the control when undo is invalid — not a blocking Modal when undo would work.

Fail

Modal double-confirm used where undo is valid; or no undo/Popconfirm on that delete.

Citations

Ant Design — Feedback spec

https://ant.design/docs/spec/feedback

Open UX · cited UX rules agents audit against

Privacy · Sources ·