-
Notifications
You must be signed in to change notification settings - Fork 25
feat: undo delete action #1381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: undo delete action #1381
Conversation
8d9b4be to
c17ab65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements an undo delete functionality for files, allowing users to restore recently deleted items through notification actions or a keyboard shortcut (Ctrl/Cmd + Z). It also removes the info icon from notifications to reduce visual noise.
Key changes:
- Added undo delete action that appears in delete notifications
- Implemented keyboard shortcut (Ctrl/Cmd + Z) for undoing deletes
- Enhanced notification system to support action buttons
- Removed info icon from notifications by default
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MessageBar.vue | Added action slot and disabled info icon display |
| useFileActionsDeleteResources.ts | Integrated undo functionality with delete operations and keyboard shortcuts |
| useFileActionsUndoDelete.ts | New composable implementing the undo delete action |
| useFileActionsRestore.ts | Added options for customizing success messages and completion callbacks |
| messages.ts | Extended Message interface to support actions |
| useKeyboardActions.ts | Added Z key constant for keyboard shortcuts |
| OcNotificationMessage.vue | Added actions slot and showInfoIcon prop |
| OcTooltip.ts | Increased z-index for tooltip display |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/web-pkg/src/composables/actions/files/useFileActionsUndoDelete.ts
Show resolved
Hide resolved
packages/web-pkg/src/composables/actions/files/useFileActionsUndoDelete.ts
Show resolved
Hide resolved
packages/web-pkg/src/composables/actions/helpers/useFileActionsDeleteResources.ts
Show resolved
Hide resolved
|
Fyi I disabled the shortcut label for now. Having it included in the label looks to crowded in the notification message. Implementing it as tooltip would require some general refactoring because our general Action component & interface don't support this. |
Adds an action that lets users undo a delete.
69ec707 to
68300ee
Compare
AlexAndBear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
68300ee to
cdf5aa8
Compare
feat: undo delete action
Adds an action that lets users undo a delete via the delete notification or keyboard shortcut ctrl/cmd + Z.
Also removes the info icon on notifications as it doesn't really provide any value and just adds noise.
closes #1357