Admin UX roadmap, item 9: Undo instead of "Are you sure?".
How it works: deleting from a list (row menu or ticked rows) or from an object's page no longer asks first. The objects vanish at once and a toast reads "Deleted example.org · Undo" (or "Deleted 3 domains") for 8 seconds. The delete is only sent to the server when that time is up, so Undo simply forgets it: nothing is re-created, so ids, secrets and history are untouched.
a delete the server refuses (e.g. a domain that still has accounts) brings the objects back, with the reason in a "Not deleted" toast
a list hides objects that are waiting, and reloads when a delete is undone or sent, also after navigating away and back
leaving the page while a delete waits sends it at once and asks the browser to hold on, so nothing is lost or kept silently
still asks first: "all matching" bulk deletes, which can reach far past the page; and changing a property from a menu (not a delete)
Also fixed: every toast closed after 5 seconds regardless of its duration, which cut the Security page's 10-second Undo short.
New: src/lib/pendingDeletes.ts (hold/undo/send, 6 tests with fake timers) and src/components/common/undoableDelete.tsx (toast, batched destroy, failure report).
Translation: 6 new strings in en.json (undoDelete.*), English only for now. The old delete-confirmation strings are now unused.
Checked locally: typecheck, lint, i18n:check, 622 tests, build, notice-check. Previewed against a real local server: delete + Undo within a second (kept on the server), form Delete without Undo (gone from the server after 8 s, toast up the full time), and a refused delete (domain with an account: came back with the reason). Not exercised in a browser: closing the tab during the window.
Admin UX roadmap, item 9: Undo instead of "Are you sure?".
**How it works:** deleting from a list (row menu or ticked rows) or from an object's page no longer asks first. The objects vanish at once and a toast reads "Deleted example.org · Undo" (or "Deleted 3 domains") for 8 seconds. The delete is only sent to the server when that time is up, so Undo simply forgets it: nothing is re-created, so ids, secrets and history are untouched.
- a delete the server refuses (e.g. a domain that still has accounts) brings the objects back, with the reason in a "Not deleted" toast
- a list hides objects that are waiting, and reloads when a delete is undone or sent, also after navigating away and back
- leaving the page while a delete waits sends it at once and asks the browser to hold on, so nothing is lost or kept silently
- **still asks first:** "all matching" bulk deletes, which can reach far past the page; and changing a property from a menu (not a delete)
**Also fixed:** every toast closed after 5 seconds regardless of its `duration`, which cut the Security page's 10-second Undo short.
New: `src/lib/pendingDeletes.ts` (hold/undo/send, 6 tests with fake timers) and `src/components/common/undoableDelete.tsx` (toast, batched destroy, failure report).
Translation: 6 new strings in en.json (`undoDelete.*`), English only for now. The old delete-confirmation strings are now unused.
Checked locally: typecheck, lint, i18n:check, 622 tests, build, notice-check. Previewed against a real local server: delete + Undo within a second (kept on the server), form Delete without Undo (gone from the server after 8 s, toast up the full time), and a refused delete (domain with an account: came back with the reason). Not exercised in a browser: closing the tab during the window.
Deleting from a list or an object's page no longer asks first. The
objects vanish at once and a toast offers Undo for 8 seconds; the delete
is sent to the server only when that time is up, so Undo just forgets
it and nothing has to be re-created. A delete the server refuses brings
the objects back with the reason. Leaving the page sends what is still
waiting. "All matching" bulk deletes, which can reach past the page,
still ask first.
Toasts now honor their own duration; they all closed after 5 seconds,
which cut short the Security page's 10-second Undo.
Admin UX roadmap, item 9.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Admin UX roadmap, item 9: Undo instead of "Are you sure?".
How it works: deleting from a list (row menu or ticked rows) or from an object's page no longer asks first. The objects vanish at once and a toast reads "Deleted example.org · Undo" (or "Deleted 3 domains") for 8 seconds. The delete is only sent to the server when that time is up, so Undo simply forgets it: nothing is re-created, so ids, secrets and history are untouched.
Also fixed: every toast closed after 5 seconds regardless of its
duration, which cut the Security page's 10-second Undo short.New:
src/lib/pendingDeletes.ts(hold/undo/send, 6 tests with fake timers) andsrc/components/common/undoableDelete.tsx(toast, batched destroy, failure report).Translation: 6 new strings in en.json (
undoDelete.*), English only for now. The old delete-confirmation strings are now unused.Checked locally: typecheck, lint, i18n:check, 622 tests, build, notice-check. Previewed against a real local server: delete + Undo within a second (kept on the server), form Delete without Undo (gone from the server after 8 s, toast up the full time), and a refused delete (domain with an account: came back with the reason). Not exercised in a browser: closing the tab during the window.