Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Oct 15, 2025

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

@JammingBen JammingBen self-assigned this Oct 15, 2025
@JammingBen JammingBen force-pushed the feat/delete-undo branch 4 times, most recently from 8d9b4be to c17ab65 Compare October 16, 2025 13:39
@JammingBen JammingBen marked this pull request as ready for review October 17, 2025 06:23
Copilot AI review requested due to automatic review settings October 17, 2025 06:23
Copy link
Contributor

Copilot AI left a 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.

@JammingBen
Copy link
Contributor Author

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.
@JammingBen JammingBen force-pushed the feat/delete-undo branch 3 times, most recently from 69ec707 to 68300ee Compare October 22, 2025 09:25
Copy link
Contributor

@AlexAndBear AlexAndBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@JammingBen JammingBen merged commit f66d4d9 into main Oct 22, 2025
28 checks passed
@JammingBen JammingBen deleted the feat/delete-undo branch October 22, 2025 10:41
@openclouders openclouders mentioned this pull request Oct 22, 2025
1 task
openclouders pushed a commit that referenced this pull request Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Undo" action in notification

3 participants