feat(web): «Deshacer» after moving, reassigning or trashing a ticket
A toast offers to undo for seven seconds (or Ctrl/⌘ Z outside a field) by running the opposite command: the card back to its column or the ticket to its status (the workflow may refuse it), the previous assignee, or the ticket back from the trash. The undo itself only says «Deshecho». On the board, from the card's assignee; on the ticket page, status, assignee and trash, which no longer asks for confirmation. The toast is the app's own (UndoToastComponent): pi-snack-bar cannot tell its button from the timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,13 @@ export const issuePageEvents = eventGroup({
|
||||
source: 'Issue Page',
|
||||
events: {
|
||||
opened: type<{ idOrKey: string }>(),
|
||||
statusChangeRequested: type<ChangeStatusInput>(),
|
||||
assignRequested: type<{ issueId: string; assigneeId: string | null }>(),
|
||||
/** `undoing`: it is the «Deshacer» of a change, which offers none. */
|
||||
statusChangeRequested: type<ChangeStatusInput & { undoing?: boolean }>(),
|
||||
assignRequested: type<{
|
||||
issueId: string;
|
||||
assigneeId: string | null;
|
||||
undoing?: boolean;
|
||||
}>(),
|
||||
updateRequested: type<UpdateIssueInput>(),
|
||||
linkRequested: type<LinkIssuesInput>(),
|
||||
/** Relate by the other ticket's key (e.g. BE-3), resolved to its id first. */
|
||||
@@ -44,7 +49,11 @@ export const issuePageEvents = eventGroup({
|
||||
}>(),
|
||||
watchRequested: type<{ issueId: string; watching: boolean }>(),
|
||||
pinRequested: type<{ issueId: string; pinned: boolean }>(),
|
||||
trashRequested: type<{ issueId: string; trashed: boolean }>(),
|
||||
trashRequested: type<{
|
||||
issueId: string;
|
||||
trashed: boolean;
|
||||
undoing?: boolean;
|
||||
}>(),
|
||||
/** Place the ticket under another one by its key (e.g. WEB-3); null: out. */
|
||||
parentRequested: type<{ issueId: string; parentKey: string | null }>(),
|
||||
subtaskCreateRequested: type<{
|
||||
@@ -90,6 +99,8 @@ export const issueApiEvents = eventGroup({
|
||||
commandSucceeded: type<string>(),
|
||||
/** A checklist step was saved (no toast for something so small). */
|
||||
checklistSaved: type<void>(),
|
||||
/** Changed, and «Deshacer» offered instead of a plain toast. */
|
||||
undoOffered: type<void>(),
|
||||
commandFailed: type<string>(),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user